[Snow Team] backend-fixer: auto-commit work
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user