Add test to search for umlauts to photo search

This commit is contained in:
Theresa Gresch 2019-12-15 13:23:45 +01:00
parent 784fad44b7
commit 1053cd0fe3

View file

@ -47,6 +47,16 @@ func TestParseQueryString(t *testing.T) {
assert.Equal(t, false, form.Duplicate)
assert.Equal(t, 33.45343166666667, form.Long)
})
t.Run("valid query with umlauts", func(t *testing.T) {
form := &PhotoSearch{Query: "description:\"tübingen\""}
err := form.ParseQueryString()
log.Debugf("%+v\n", form)
assert.Nil(t, err)
assert.Equal(t, "tübingen", form.Description)
})
t.Run("query for invalid filter", func(t *testing.T) {
form := &PhotoSearch{Query: "xxx:false"}