summaryrefslogtreecommitdiff
path: root/internal/processing/media/getfile_test.go
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2023-08-07 19:38:11 +0200
committerLibravatar GitHub <noreply@github.com>2023-08-07 18:38:11 +0100
commitbe3718f6e4c7bb229f9eb78b44c52d14399977cc (patch)
treea0efc132fbfb806227cc4b9af8bac9f5a5775c1c /internal/processing/media/getfile_test.go
parent[chore]: Bump github.com/tdewolff/minify/v2 from 2.12.7 to 2.12.8 (#2073) (diff)
downloadgotosocial-be3718f6e4c7bb229f9eb78b44c52d14399977cc.tar.xz
[chore] Use generic pointer function (#2080)
This replaces the different $TypePtr functions with a generic implementation.
Diffstat (limited to 'internal/processing/media/getfile_test.go')
-rw-r--r--internal/processing/media/getfile_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/processing/media/getfile_test.go b/internal/processing/media/getfile_test.go
index c1acd859b..f0517b339 100644
--- a/internal/processing/media/getfile_test.go
+++ b/internal/processing/media/getfile_test.go
@@ -28,6 +28,7 @@ import (
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/media"
+ "github.com/superseriousbusiness/gotosocial/internal/util"
"github.com/superseriousbusiness/gotosocial/testrig"
)
@@ -68,7 +69,7 @@ func (suite *GetFileTestSuite) TestGetRemoteFileUncached() {
// uncache the file from local
testAttachment := suite.testAttachments["remote_account_1_status_1_attachment_1"]
- testAttachment.Cached = testrig.FalseBool()
+ testAttachment.Cached = util.Ptr(false)
err := suite.db.UpdateByID(ctx, testAttachment, testAttachment.ID, "cached")
suite.NoError(err)
err = suite.storage.Delete(ctx, testAttachment.File.Path)
@@ -120,7 +121,7 @@ func (suite *GetFileTestSuite) TestGetRemoteFileUncachedInterrupted() {
// uncache the file from local
testAttachment := suite.testAttachments["remote_account_1_status_1_attachment_1"]
- testAttachment.Cached = testrig.FalseBool()
+ testAttachment.Cached = util.Ptr(false)
err := suite.db.UpdateByID(ctx, testAttachment, testAttachment.ID, "cached")
suite.NoError(err)
err = suite.storage.Delete(ctx, testAttachment.File.Path)
@@ -177,7 +178,7 @@ func (suite *GetFileTestSuite) TestGetRemoteFileThumbnailUncached() {
suite.NoError(err)
// uncache the file from local
- testAttachment.Cached = testrig.FalseBool()
+ testAttachment.Cached = util.Ptr(false)
err = suite.db.UpdateByID(ctx, testAttachment, testAttachment.ID, "cached")
suite.NoError(err)
err = suite.storage.Delete(ctx, testAttachment.File.Path)