新增荣耀勋章/幸运币商品:迁移、上游商品映射与测试

This commit is contained in:
yml2213
2026-08-03 12:35:39 +08:00
parent e7c875c715
commit 8dc2a4077a
3 changed files with 68 additions and 8 deletions
+16
View File
@@ -76,6 +76,22 @@ func TestDeliveryLinkGenerateAuthorizeAndRevoke(t *testing.T) {
}
}
func TestDeliveryGoodIDIncludesMedalAndCoinProducts(t *testing.T) {
cases := map[string]string{
"honor_medal_x2": "682ef39ca8f40c4234c59f45",
"honor_medal_x30": "682ef39ca8f40c4234c59f43",
"honor_medal_x90": "682ef39ca8f40c4234c59f41",
"lucky_coin_x2": "682ef39ca8f40c4234c59f46",
"lucky_coin_x30": "682ef39ca8f40c4234c59f44",
"lucky_coin_x90": "682ef39ca8f40c4234c59f42",
}
for sku, want := range cases {
if got := deliveryGoodID("dlc", sku); got != want {
t.Fatalf("unexpected good id for %s: got %q want %q", sku, got, want)
}
}
}
func TestDeliveryMerchantApiBindAndSubmit(t *testing.T) {
db := newServiceTestDB(t)
merchantID, _ := seedFulfillmentMerchant(t, db, "delivery-api", 5000, 5, 100)