discount_gift_test.go 531 B

123456789101112131415161718192021222324
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoGetByDiscountIds(t *testing.T) {
  8. convey.Convey("GetByDiscountIds", t, func(c convey.C) {
  9. var (
  10. ctx = context.Background()
  11. ids = []int64{1}
  12. )
  13. c.Convey("When everything gose positive", func(c convey.C) {
  14. res, err := d.GetByDiscountIds(ctx, ids)
  15. c.Convey("Then err should be nil.res should not be nil.", func(c convey.C) {
  16. c.So(err, convey.ShouldBeNil)
  17. c.So(res, convey.ShouldNotBeNil)
  18. })
  19. })
  20. })
  21. }