Skip to content

Commit f4460f4

Browse files
authored
Adjust 365-day expiration time test (#624)
It's slightly more obvious in a non-leap year.
1 parent e5ca28c commit f4460f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

handlers/upload_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -426,17 +426,17 @@ func TestGuestUpload(t *testing.T) {
426426
fileExpirationTimeExpected: mustParseExpirationTime("2024-01-02T00:00:00Z"),
427427
},
428428
{
429-
description: "guest file expires in 365 day",
429+
description: "guest file expires in 365 days",
430430
guestLinkInStore: picoshare.GuestLink{
431431
ID: picoshare.GuestLinkID("abcdefgh23456789"),
432432
Created: mustParseTime("2022-01-01T00:00:00Z"),
433433
UrlExpires: mustParseExpirationTime("2030-01-02T03:04:25Z"),
434434
FileLifetime: picoshare.NewFileLifetimeInDays(365),
435435
},
436-
currentTime: mustParseTime("2024-01-01T00:00:00Z"),
436+
currentTime: mustParseTime("2023-01-01T00:00:00Z"),
437437
guestLinkID: "abcdefgh23456789",
438438
status: http.StatusOK,
439-
fileExpirationTimeExpected: mustParseExpirationTime("2024-12-31T00:00:00Z"),
439+
fileExpirationTimeExpected: mustParseExpirationTime("2024-01-01T00:00:00Z"),
440440
},
441441
} {
442442
t.Run(tt.description, func(t *testing.T) {

0 commit comments

Comments
 (0)