[Snow Team] backend-fixer: auto-commit work

This commit is contained in:
yml
2026-06-09 17:04:40 +08:00
parent f5b38ff772
commit 62b898d7cc
11 changed files with 291 additions and 214 deletions
@@ -69,7 +69,7 @@ func TestCreateRequiresPublishAgreements(t *testing.T) {
func TestApplySellerListingPriceUsesSellerTotalPrice(t *testing.T) {
item := &ListingDTO{
Price: 238,
PriceCent: 23800,
AssetSummary: map[string]any{
"price_breakdown": map[string]any{
"seller_total_price": 200,
@@ -79,14 +79,14 @@ func TestApplySellerListingPriceUsesSellerTotalPrice(t *testing.T) {
applySellerListingPrice(item)
if item.Price != 200 {
t.Fatalf("expected seller price 200, got %.2f", item.Price)
if item.PriceCent != 20000 {
t.Fatalf("expected seller price 20000, got %d", item.PriceCent)
}
}
func TestApplySellerListingPriceKeepsFallbackPrice(t *testing.T) {
item := &ListingDTO{
Price: 238,
PriceCent: 23800,
AssetSummary: map[string]any{
"price_breakdown": map[string]any{
"seller_total_price": 0,
@@ -96,8 +96,8 @@ func TestApplySellerListingPriceKeepsFallbackPrice(t *testing.T) {
applySellerListingPrice(item)
if item.Price != 238 {
t.Fatalf("expected fallback price 238, got %.2f", item.Price)
if item.PriceCent != 23800 {
t.Fatalf("expected fallback price 23800, got %d", item.PriceCent)
}
}