Test: Add test for invalid query to query/album.go

This commit is contained in:
Theresa Gresch 2020-02-02 13:02:14 +01:00
parent 223e4a5df4
commit 9069d1312c

View file

@ -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)
})
}