order_test.go 590 B

123456789101112131415161718192021222324252627
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/admin/main/vip/model"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestService_OrderList(t *testing.T) {
  9. Convey("test order list", t, func() {
  10. order := new(model.ArgPayOrder)
  11. order.Mid = 1001
  12. res, count, err := s.OrderList(context.TODO(), order)
  13. t.Logf("orderlist len:%+v count:%v", res, count)
  14. So(err, ShouldBeNil)
  15. })
  16. }
  17. func TestService_Refund(t *testing.T) {
  18. Convey("test refund ", t, func() {
  19. err := s.Refund(context.TODO(), "93035846180822184113", "zhaozhihao", 10)
  20. So(err, ShouldBeNil)
  21. })
  22. }