Commit c8146e75 by Torkel Ödegaard

Fixed json index unit test

parent bb7d79e6
...@@ -17,14 +17,14 @@ func TestJsonDashIndex(t *testing.T) { ...@@ -17,14 +17,14 @@ func TestJsonDashIndex(t *testing.T) {
}) })
Convey("Should be able to search index", func() { Convey("Should be able to search index", func() {
res, err := index.Search(&Query{Title: "", Tag: ""}) res, err := index.Search(&Query{Title: "", Tag: "", Limit: 20})
So(err, ShouldBeNil) So(err, ShouldBeNil)
So(len(res), ShouldEqual, 3) So(len(res), ShouldEqual, 3)
}) })
Convey("Should be able to search index by title", func() { Convey("Should be able to search index by title", func() {
res, err := index.Search(&Query{Title: "home", Tag: ""}) res, err := index.Search(&Query{Title: "home", Tag: "", Limit: 20})
So(err, ShouldBeNil) So(err, ShouldBeNil)
So(len(res), ShouldEqual, 1) So(len(res), ShouldEqual, 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment