feat(v2): order 补 biz_code + webhook payload 带 product_biz_code(收口 P2 延后项)
This commit is contained in:
@@ -81,6 +81,23 @@ func TestCreateOrderPipeline(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCreateOrderPersistsBizCode(t *testing.T) {
|
||||
g, _, _, orders := newGateway(t)
|
||||
res, err := g.CreateOrder(context.Background(), gateway.CreateOrderInput{
|
||||
SKU: "pro_year", Method: "fake", BizSystem: "pangolin", BizRef: "u-1",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("create: %v", err)
|
||||
}
|
||||
o, err := orders.GetOrder(res.OrderNo)
|
||||
if err != nil {
|
||||
t.Fatalf("get order: %v", err)
|
||||
}
|
||||
if o.BizCode != "pro_year" { // stubResolver 的 bizCode
|
||||
t.Fatalf("order.BizCode = %q, want pro_year", o.BizCode)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCreateOrderErrors(t *testing.T) {
|
||||
g, _, _, _ := newGateway(t)
|
||||
ctx := context.Background()
|
||||
|
||||
Reference in New Issue
Block a user