diff options
author | 2021-08-31 15:59:12 +0200 | |
---|---|---|
committer | 2021-09-01 11:11:26 +0200 | |
commit | 2786b5f88742c3f32b8ed497df3737cb4f57caec (patch) | |
tree | c088b71b228a52fb3bbf37628caea82ff7a42067 /internal/gtsmodel/mediaattachment_test.go | |
parent | go fmt (diff) | |
download | gotosocial-2786b5f88742c3f32b8ed497df3737cb4f57caec.tar.xz |
change muchos things
Diffstat (limited to 'internal/gtsmodel/mediaattachment_test.go')
-rw-r--r-- | internal/gtsmodel/mediaattachment_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/gtsmodel/mediaattachment_test.go b/internal/gtsmodel/mediaattachment_test.go index e95d07de4..e1502ba62 100644 --- a/internal/gtsmodel/mediaattachment_test.go +++ b/internal/gtsmodel/mediaattachment_test.go @@ -212,6 +212,18 @@ func (suite *MediaAttachmentValidateTestSuite) TestValidateMediaAttachmentBlurha suite.NoError(err) } +func (suite *MediaAttachmentValidateTestSuite) TestValidateMediaAttachmentProcessing() { + m := happyMediaAttachment() + + m.Processing = 420 + err := gtsmodel.ValidateStruct(*m) + suite.EqualError(err, "Key: 'MediaAttachment.Processing' Error:Field validation for 'Processing' failed on the 'oneof' tag") + + m.Processing = -5 + err = gtsmodel.ValidateStruct(*m) + suite.EqualError(err, "Key: 'MediaAttachment.Processing' Error:Field validation for 'Processing' failed on the 'oneof' tag") +} + func TestMediaAttachmentValidateTestSuite(t *testing.T) { suite.Run(t, new(MediaAttachmentValidateTestSuite)) } |