go-common/app/interface/main/tv/dao/search/search_sug_test.go

30 lines
616 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package search
import (
"context"
"testing"
searchMdl "go-common/app/interface/main/tv/model/search"
"github.com/smartystreets/goconvey/convey"
)
func TestSearchSearchSug(t *testing.T) {
var (
ctx = context.Background()
req = &searchMdl.ReqSug{
MobiApp: "android_tv_yst",
Build: "1011",
Platform: "android",
Term: "test",
}
)
convey.Convey("SearchSug", t, func(c convey.C) {
result, err := d.SearchSug(ctx, req)
c.Convey("Then err should be nil.result should not be nil.", func(c convey.C) {
c.So(err, convey.ShouldBeNil)
c.So(result, convey.ShouldNotBeNil)
})
})
}