go-common/app/interface/main/playlist/dao/search_test.go

26 lines
546 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
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)
})
})
}