search_test.go 596 B

12345678910111213141516171819202122232425
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/admin/main/creative/model/academy"
  5. "testing"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoArchivesWithES(t *testing.T) {
  9. convey.Convey("ArchivesWithES", t, func(ctx convey.C) {
  10. var (
  11. c = context.Background()
  12. aca = &academy.EsParam{}
  13. )
  14. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  15. res, err := d.ArchivesWithES(c, aca)
  16. ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) {
  17. ctx.So(err, convey.ShouldBeNil)
  18. ctx.So(res, convey.ShouldNotBeNil)
  19. })
  20. })
  21. })
  22. }