diff options
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/gallery/query.go | 2 | ||||
| -rw-r--r-- | internal/gallery/query_photos_test.go | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/internal/gallery/query.go b/internal/gallery/query.go index e2003d5..b66f99a 100644 --- a/internal/gallery/query.go +++ b/internal/gallery/query.go @@ -24,4 +24,6 @@ type Query struct { Sort SortField Order SortOrder + + Extension string } diff --git a/internal/gallery/query_photos_test.go b/internal/gallery/query_photos_test.go index c9bb986..05dab67 100644 --- a/internal/gallery/query_photos_test.go +++ b/internal/gallery/query_photos_test.go @@ -250,3 +250,13 @@ func TestQueryPhotosSortByDateDescending(t *testing.T) { assertIDs(t, got, "new", "mid", "old") } + +func TestQueryPhotosIgnoresExtensionFilteringForNow(t *testing.T) { + photos := makePhotos(3) + + got := QueryPhotos(photos, Query{ + Extension: "jpg", + }) + + assertIDs(t, got, "0", "1", "2") +} |