summaryrefslogtreecommitdiff
path: root/internal/api/client/admin/mediacleanup_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-06-19 17:10:24 +0200
committerLibravatar GitHub <noreply@github.com>2022-06-19 17:10:24 +0200
commit610395d5a55ef0b82b7faaf70127c693d1abd58a (patch)
tree711b1ced129d507c7b105844ea5e6a420387f824 /internal/api/client/admin/mediacleanup_test.go
parent[packaging] Packaging updates (#655) (diff)
downloadgotosocial-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.go4
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)