search_test.go 438 B

12345678910111213141516171819202122
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoMidsByName(t *testing.T) {
  8. var (
  9. c = context.TODO()
  10. names = []string{"", "一"}
  11. )
  12. convey.Convey("Search mids by name", t, func(ctx convey.C) {
  13. p1, err := d.MidsByName(c, names)
  14. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  15. ctx.So(err, convey.ShouldBeNil)
  16. ctx.So(p1, convey.ShouldNotBeNil)
  17. })
  18. })
  19. }