summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/status_test.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@protonmail.com>2021-08-30 20:20:27 +0200
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2021-09-01 11:11:26 +0200
commit356d28fef9167ba1ec37ecc1a547196e78e56089 (patch)
treea06b67ecc9860ebf058c94aa10a6796393fc5b96 /internal/gtsmodel/status_test.go
parentmore work on struct validation (diff)
downloadgotosocial-356d28fef9167ba1ec37ecc1a547196e78e56089.tar.xz
more work on struct validation
Diffstat (limited to 'internal/gtsmodel/status_test.go')
-rw-r--r--internal/gtsmodel/status_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/gtsmodel/status_test.go b/internal/gtsmodel/status_test.go
index a139fe715..1d934b891 100644
--- a/internal/gtsmodel/status_test.go
+++ b/internal/gtsmodel/status_test.go
@@ -101,7 +101,7 @@ func (suite *StatusValidateTestSuite) TestValidateStatusAttachmentIDs() {
s.AttachmentIDs[0] = ""
err := gtsmodel.ValidateStruct(*s)
- suite.EqualError(err, "Key: 'Status.AttachmentIDs[0]' Error:Field validation for 'AttachmentIDs[0]' failed on the 'required' tag")
+ suite.EqualError(err, "Key: 'Status.AttachmentIDs[0]' Error:Field validation for 'AttachmentIDs[0]' failed on the 'ulid' tag")
s.AttachmentIDs[0] = "01FE96W293ZPRG9FQQP48HK8N001FE96W32AT24VYBGM12WN3GKB"
err = gtsmodel.ValidateStruct(*s)
@@ -109,7 +109,7 @@ func (suite *StatusValidateTestSuite) TestValidateStatusAttachmentIDs() {
s.AttachmentIDs[1] = ""
err = gtsmodel.ValidateStruct(*s)
- suite.EqualError(err, "Key: 'Status.AttachmentIDs[0]' Error:Field validation for 'AttachmentIDs[0]' failed on the 'ulid' tag\nKey: 'Status.AttachmentIDs[1]' Error:Field validation for 'AttachmentIDs[1]' failed on the 'required' tag")
+ suite.EqualError(err, "Key: 'Status.AttachmentIDs[0]' Error:Field validation for 'AttachmentIDs[0]' failed on the 'ulid' tag\nKey: 'Status.AttachmentIDs[1]' Error:Field validation for 'AttachmentIDs[1]' failed on the 'ulid' tag")
s.AttachmentIDs = []string{}
err = gtsmodel.ValidateStruct(*s)