diff --git a/web/query_test.go b/web/query_test.go index 121f7ea..5dc1f64 100644 --- a/web/query_test.go +++ b/web/query_test.go @@ -9,10 +9,13 @@ import ( func TestQuery1(t *testing.T) { user := "test" query := fmt.Sprintf("user:%s", user) - res := ParseQuery(query) + res, err := ParseQuery(query) if res["user"] != user { t.Error("Fail TestQuery user parsing") } + if err != nil { + t.Error(err.Error()) + } } // TestQuery2 @@ -20,10 +23,13 @@ func TestQuery2(t *testing.T) { user := "test" attr := "bla foo" query := fmt.Sprintf("user:%s attr:%s", user, attr) - res := ParseQuery(query) + res, err := ParseQuery(query) if res["user"] != user { t.Error("Fail TestQuery user parsing") } + if err != nil { + t.Error(err.Error()) + } if res["attr"] != attr { t.Error("Fail TestQuery attr parsing") } @@ -35,10 +41,13 @@ func TestQuery3(t *testing.T) { attr := "bla foo" keys := "v1 v2" query := fmt.Sprintf("user:%s attr:%s keys:%s", user, attr, keys) - res := ParseQuery(query) + res, err := ParseQuery(query) if res["user"] != user { t.Error("Fail TestQuery user parsing") } + if err != nil { + t.Error(err.Error()) + } if res["attr"] != attr { t.Error("Fail TestQuery attr parsing") }