From 9069d1312cac2f80dfef9b217536291714306c1f Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Sun, 2 Feb 2020 13:02:14 +0100 Subject: [PATCH] Test: Add test for invalid query to query/album.go --- internal/query/album_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/query/album_test.go b/internal/query/album_test.go index d079d88f5..c314acffe 100644 --- a/internal/query/album_test.go +++ b/internal/query/album_test.go @@ -77,4 +77,10 @@ func TestRepo_Albums(t *testing.T) { assert.Nil(t, err) assert.Equal(t, 2, len(result)) }) + t.Run("search with invalid query string", func(t *testing.T) { + query := form.NewAlbumSearch("xxx:bla") + result, err := search.Albums(query) + assert.Error(t, err, "unknown filter") + t.Log(result) + }) }