search_test.go 566 B

12345678910111213141516171819202122232425
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/admin/main/esports/model"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoSearchArc(t *testing.T) {
  9. var (
  10. c = context.Background()
  11. p = &model.ArcListParam{Pn: 1, Ps: 1, Title: "dota"}
  12. )
  13. convey.Convey("SearchArc", t, func(ctx convey.C) {
  14. rs, total, err := d.SearchArc(c, p)
  15. ctx.Convey("Then err should be nil.rs,total should not be nil.", func(ctx convey.C) {
  16. ctx.So(err, convey.ShouldBeNil)
  17. ctx.So(total, convey.ShouldNotBeNil)
  18. ctx.So(rs, convey.ShouldNotBeNil)
  19. })
  20. })
  21. }