1
0

Ensure case insensitive search on postgres (#927)

Reviewed-on: https://kolaente.dev/vikunja/api/pulls/927
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
This commit is contained in:
konrad
2021-08-01 21:40:25 +00:00
parent 9c2a59582a
commit 4c5f457313
23 changed files with 308 additions and 108 deletions

View File

@ -112,6 +112,18 @@ func TestTeam_ReadAll(t *testing.T) {
ts := reflect.ValueOf(teams)
assert.Equal(t, 8, ts.Len())
})
t.Run("search", func(t *testing.T) {
s := db.NewSession()
defer s.Close()
team := &Team{}
teams, _, _, err := team.ReadAll(s, doer, "READ_only_on_list6", 1, 50)
assert.NoError(t, err)
assert.Equal(t, reflect.TypeOf(teams).Kind(), reflect.Slice)
ts := teams.([]*Team)
assert.Len(t, ts, 1)
assert.Equal(t, int64(2), ts[0].ID)
})
}
func TestTeam_Update(t *testing.T) {