added empty query checks

This commit is contained in:
ston1th 2017-11-12 15:37:16 +01:00
commit 0e2b25e788
3 changed files with 31 additions and 5 deletions

View file

@ -69,6 +69,16 @@ func TestNewQuery(t *testing.T) {
if err == nil {
t.Error("invalid sort")
}
_, err = NewQuery(" ")
if err == nil {
t.Error("empty query")
}
_, err = NewQuery("OR")
if err == nil {
t.Error("empty query")
}
}
const (