diff options
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/gallery/query.go | 5 | ||||
| -rw-r--r-- | internal/gallery/query_photos_test.go | 50 |
2 files changed, 0 insertions, 55 deletions
diff --git a/internal/gallery/query.go b/internal/gallery/query.go index 355aa2e..346c25f 100644 --- a/internal/gallery/query.go +++ b/internal/gallery/query.go @@ -1,7 +1,5 @@ package gallery -import "time" - type SortField string const ( @@ -29,7 +27,4 @@ type Query struct { Extension string Search string - - From time.Time - To time.Time } diff --git a/internal/gallery/query_photos_test.go b/internal/gallery/query_photos_test.go index e5ef560..f38c237 100644 --- a/internal/gallery/query_photos_test.go +++ b/internal/gallery/query_photos_test.go @@ -409,53 +409,3 @@ func TestQueryPhotosFilterSearchSortThenPaginate(t *testing.T) { assertIDs(t, got, "5") } - -func TestQueryPhotosIgnoresDateRangesForNow(t *testing.T) { - photos := []Photo{ - { - ID: "old", - Metadata: metadata.Metadata{ - DateTaken: time.Date( - 2024, - 1, - 1, - 0, - 0, - 0, - 0, - time.UTC, - ), - }, - }, - { - ID: "new", - Metadata: metadata.Metadata{ - DateTaken: time.Date( - 2025, - 1, - 1, - 0, - 0, - 0, - 0, - time.UTC, - ), - }, - }, - } - - got := QueryPhotos(photos, Query{ - From: time.Date( - 2025, - 1, - 1, - 0, - 0, - 0, - 0, - time.UTC, - ), - }) - - assertIDs(t, got, "old", "new") -} |