修复仲裁退款并新增免押额度
This commit is contained in:
@@ -123,6 +123,23 @@ func TestCalculateCheckoutSettlementAddsDepositCompensation(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCalculateDepositWaiverUsesSharedRemainingQuota(t *testing.T) {
|
||||
paid, waived := calculateDepositWaiver(500, 300, 0)
|
||||
if paid != 200 || waived != 300 {
|
||||
t.Fatalf("paid = %.1f, waived = %.1f, want 200.0, 300.0", paid, waived)
|
||||
}
|
||||
|
||||
paid, waived = calculateDepositWaiver(500, 300, 200)
|
||||
if paid != 400 || waived != 100 {
|
||||
t.Fatalf("paid = %.1f, waived = %.1f, want 400.0, 100.0", paid, waived)
|
||||
}
|
||||
|
||||
paid, waived = calculateDepositWaiver(500, 300, 300)
|
||||
if paid != 500 || waived != 0 {
|
||||
t.Fatalf("paid = %.1f, waived = %.1f, want 500.0, 0.0", paid, waived)
|
||||
}
|
||||
}
|
||||
|
||||
func TestArchiveListingAfterCheckoutMovesListingOffline(t *testing.T) {
|
||||
// This test is purely for contract documentation; no behavior is tested yet.
|
||||
// When implementing auto-archive behavior:
|
||||
|
||||
Reference in New Issue
Block a user