feat: align ids to int64
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"quyun/v2/providers/storage"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"github.com/spf13/cast"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"go.ipao.vip/atom/contracts"
|
||||
"go.uber.org/dig"
|
||||
@@ -94,15 +93,15 @@ func (s *CouponTestSuite) Test_CouponFlow() {
|
||||
})
|
||||
|
||||
form := &order_dto.OrderCreateForm{
|
||||
ContentID: cast.ToString(c.ID),
|
||||
UserCouponID: cast.ToString(uc.ID),
|
||||
ContentID: c.ID,
|
||||
UserCouponID: uc.ID,
|
||||
}
|
||||
// Simulate Auth context for Order service
|
||||
res, err := Order.Create(ctx, user.ID, form)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
// Verify Order
|
||||
oid := cast.ToInt64(res.OrderID)
|
||||
oid := res.OrderID
|
||||
o, _ := models.OrderQuery.WithContext(ctx).Where(models.OrderQuery.ID.Eq(oid)).First()
|
||||
So(o.AmountOriginal, ShouldEqual, 2000)
|
||||
So(o.AmountDiscount, ShouldEqual, 500)
|
||||
|
||||
Reference in New Issue
Block a user