diff options
author | 2022-06-19 17:10:24 +0200 | |
---|---|---|
committer | 2022-06-19 17:10:24 +0200 | |
commit | 610395d5a55ef0b82b7faaf70127c693d1abd58a (patch) | |
tree | 711b1ced129d507c7b105844ea5e6a420387f824 /internal/api/client/admin/mediacleanup_test.go | |
parent | [packaging] Packaging updates (#655) (diff) | |
download | gotosocial-610395d5a55ef0b82b7faaf70127c693d1abd58a.tar.xz |
[chore] make tests more cacheable by avoiding time.Now() (#656)
Diffstat (limited to 'internal/api/client/admin/mediacleanup_test.go')
-rw-r--r-- | internal/api/client/admin/mediacleanup_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/api/client/admin/mediacleanup_test.go b/internal/api/client/admin/mediacleanup_test.go index 449777541..50f23b2f0 100644 --- a/internal/api/client/admin/mediacleanup_test.go +++ b/internal/api/client/admin/mediacleanup_test.go @@ -81,7 +81,7 @@ func (suite *MediaCleanupTestSuite) TestMediaCleanupNoArg() { suite.NoError(err) // the media should no longer be cached - suite.True(prunedAttachment.Cached) + suite.False(prunedAttachment.Cached) } func (suite *MediaCleanupTestSuite) TestMediaCleanupNotOldEnough() { @@ -90,7 +90,7 @@ func (suite *MediaCleanupTestSuite) TestMediaCleanupNotOldEnough() { // set up the request recorder := httptest.NewRecorder() - ctx := suite.newContext(recorder, http.MethodPost, []byte("{\"remote_cache_days\": 3}"), admin.EmojiPath, "application/json") + ctx := suite.newContext(recorder, http.MethodPost, []byte("{\"remote_cache_days\": 10000}"), admin.EmojiPath, "application/json") // call the handler suite.adminModule.MediaCleanupPOSTHandler(ctx) |