summaryrefslogtreecommitdiff
path: root/internal/media/manager_test.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-01-23 15:52:18 +0100
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-01-23 15:52:18 +0100
commit3c1eb155e482071dc8ae592519060321d347683b (patch)
treeec5a2f0dccd2632011c7c12dbef37c3a708f51f1 /internal/media/manager_test.go
parentrework data function to provide filesize (diff)
downloadgotosocial-3c1eb155e482071dc8ae592519060321d347683b.tar.xz
add file size checks
Diffstat (limited to 'internal/media/manager_test.go')
-rw-r--r--internal/media/manager_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/media/manager_test.go b/internal/media/manager_test.go
index 960f34843..a3eb0360c 100644
--- a/internal/media/manager_test.go
+++ b/internal/media/manager_test.go
@@ -74,6 +74,7 @@ func (suite *ManagerTestSuite) TestSimpleJpegProcessBlocking() {
Width: 512, Height: 288, Size: 147456, Aspect: 1.7777777777777777,
}, attachment.FileMeta.Small)
suite.Equal("image/jpeg", attachment.File.ContentType)
+ suite.Equal(269739, attachment.File.FileSize)
suite.Equal("LjBzUo#6RQR._NvzRjWF?urqV@a$", attachment.Blurhash)
// now make sure the attachment is in the database
@@ -151,6 +152,7 @@ func (suite *ManagerTestSuite) TestSimpleJpegProcessAsync() {
Width: 512, Height: 288, Size: 147456, Aspect: 1.7777777777777777,
}, attachment.FileMeta.Small)
suite.Equal("image/jpeg", attachment.File.ContentType)
+ suite.Equal(269739, attachment.File.FileSize)
suite.Equal("LjBzUo#6RQR._NvzRjWF?urqV@a$", attachment.Blurhash)
// now make sure the attachment is in the database
@@ -232,6 +234,7 @@ func (suite *ManagerTestSuite) TestSimpleJpegQueueSpamming() {
Width: 512, Height: 288, Size: 147456, Aspect: 1.7777777777777777,
}, attachment.FileMeta.Small)
suite.Equal("image/jpeg", attachment.File.ContentType)
+ suite.Equal(269739, attachment.File.FileSize)
suite.Equal("LjBzUo#6RQR._NvzRjWF?urqV@a$", attachment.Blurhash)
// now make sure the attachment is in the database