You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
681 B
33 lines
681 B
package service |
|
|
|
import ( |
|
"testing" |
|
"time" |
|
|
|
"go-common/app/admin/main/coupon/model" |
|
|
|
. "github.com/smartystreets/goconvey/convey" |
|
) |
|
|
|
// go test -test.v -test.run TestBatchInfo |
|
func TestInitCodes(t *testing.T) { |
|
Convey("TestInitCodes ", t, func() { |
|
err := s.InitCodes(c, "allowance_batch100") |
|
time.Sleep(2 * time.Second) |
|
So(err, ShouldBeNil) |
|
}) |
|
} |
|
|
|
func TestCodeBlock(t *testing.T) { |
|
Convey("TestCodeBlock ", t, func() { |
|
err := s.CodeBlock(c, &model.ArgCouponCode{ID: 103}) |
|
So(err, ShouldBeNil) |
|
}) |
|
} |
|
|
|
func TestCodeUnBlock(t *testing.T) { |
|
Convey("TestCodeUnBlock ", t, func() { |
|
err := s.CodeUnBlock(c, &model.ArgCouponCode{ID: 103}) |
|
So(err, ShouldBeNil) |
|
}) |
|
}
|
|
|