Skip to content

Commit

Permalink
Adjust 365-day expiration time test (#624)
Browse files Browse the repository at this point in the history
It's slightly more obvious in a non-leap year.
  • Loading branch information
mtlynch authored Dec 13, 2024
1 parent e5ca28c commit f4460f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions handlers/upload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,17 +426,17 @@ func TestGuestUpload(t *testing.T) {
fileExpirationTimeExpected: mustParseExpirationTime("2024-01-02T00:00:00Z"),
},
{
description: "guest file expires in 365 day",
description: "guest file expires in 365 days",
guestLinkInStore: picoshare.GuestLink{
ID: picoshare.GuestLinkID("abcdefgh23456789"),
Created: mustParseTime("2022-01-01T00:00:00Z"),
UrlExpires: mustParseExpirationTime("2030-01-02T03:04:25Z"),
FileLifetime: picoshare.NewFileLifetimeInDays(365),
},
currentTime: mustParseTime("2024-01-01T00:00:00Z"),
currentTime: mustParseTime("2023-01-01T00:00:00Z"),
guestLinkID: "abcdefgh23456789",
status: http.StatusOK,
fileExpirationTimeExpected: mustParseExpirationTime("2024-12-31T00:00:00Z"),
fileExpirationTimeExpected: mustParseExpirationTime("2024-01-01T00:00:00Z"),
},
} {
t.Run(tt.description, func(t *testing.T) {
Expand Down

0 comments on commit f4460f4

Please sign in to comment.