Fix error when searching for a namespace returned no results
This commit is contained in:
@ -346,4 +346,14 @@ func TestNamespace_ReadAll(t *testing.T) {
|
||||
// Assert the first namespace is not the favorites namespace
|
||||
assert.NotEqual(t, SavedFiltersPseudoNamespace.ID, namespaces[0].ID)
|
||||
})
|
||||
t.Run("no results", func(t *testing.T) {
|
||||
db.LoadAndAssertFixtures(t)
|
||||
s := db.NewSession()
|
||||
defer s.Close()
|
||||
|
||||
n := &Namespace{}
|
||||
nn, _, _, err := n.ReadAll(s, user1, "some search string which will never return results", 1, -1)
|
||||
assert.NoError(t, err)
|
||||
assert.Nil(t, nn)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user