go-common/app/interface/main/playlist/dao/search_test.go
2019-04-22 18:49:16 +08:00

26 lines
546 B
Go

package dao
import (
"context"
"testing"
"github.com/smartystreets/goconvey/convey"
)
func TestDaoSearchVideo(t *testing.T) {
var (
c = context.Background()
pn = int(1)
ps = int(10)
query = "aaaaa"
)
convey.Convey("SearchVideo", t, func(ctx convey.C) {
res, count, err := d.SearchVideo(c, pn, ps, query)
ctx.Convey("Then err should be nil.res,count should not be nil.", func(ctx convey.C) {
ctx.So(err, convey.ShouldBeNil)
ctx.So(count, convey.ShouldNotBeNil)
ctx.So(res, convey.ShouldNotBeNil)
})
})
}