promotion_order_test.go 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/service/openplatform/ticket-sales/model"
  5. "testing"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDao_PromoOrder(t *testing.T) {
  9. Convey("PromoOrder", t, func() {
  10. res, err := d.PromoOrder(context.TODO(), 1)
  11. So(err, ShouldBeNil)
  12. t.Logf("res:%v", res)
  13. })
  14. }
  15. func TestDao_CachePromoOrder(t *testing.T) {
  16. Convey("CachePromoOrder", t, func() {
  17. res, err := d.CachePromoOrder(context.TODO(), 1)
  18. So(err, ShouldBeNil)
  19. t.Logf("res:%v", res)
  20. })
  21. }
  22. func TestDao_AddCachePromoOrder(t *testing.T) {
  23. Convey("AddCachePromoOrder", t, func() {
  24. err := d.AddCachePromoOrder(context.TODO(), 1, &model.PromotionOrder{PromoID: 1})
  25. So(err, ShouldBeNil)
  26. })
  27. }
  28. func TestDao_PromoOrderByStatus(t *testing.T) {
  29. Convey("PromoOrderByStatus", t, func() {
  30. res, err := d.PromoOrderByStatus(context.TODO(), 1, 1, 1, 1)
  31. So(err, ShouldBeNil)
  32. t.Logf("res:%v", res)
  33. })
  34. }
  35. func TestDao_PromoOrderDoing(t *testing.T) {
  36. Convey("PromoOrderDoing", t, func() {
  37. res, err := d.PromoOrderDoing(context.TODO(), 1, 1, 1)
  38. So(err, ShouldBeNil)
  39. t.Logf("res:%v", res)
  40. })
  41. }
  42. func TestDao_AddPromoOrder(t *testing.T) {
  43. Convey("AddPromoOrder", t, func() {
  44. res, err := d.AddPromoOrder(context.TODO(), 1, 1, 1, 1, 1, 1, 1, 1)
  45. So(err, ShouldBeNil)
  46. t.Logf("res:%v", res)
  47. })
  48. }
  49. func TestDao_UpdatePromoOrderStatus(t *testing.T) {
  50. Convey("UpdatePromoOrderStatus", t, func() {
  51. res, err := d.UpdatePromoOrderStatus(context.TODO(), 1, 1)
  52. So(err, ShouldBeNil)
  53. t.Logf("res:%v", res)
  54. })
  55. }
  56. func TestDao_GroupOrdersByStatus(t *testing.T) {
  57. Convey("GroupOrdersByStatus", t, func() {
  58. res, err := d.GroupOrdersByStatus(context.TODO(), 1, 1)
  59. So(err, ShouldBeNil)
  60. t.Logf("res:%v", res)
  61. })
  62. }