修复仲裁退款并新增免押额度

This commit is contained in:
yml
2026-06-08 21:00:39 +08:00
parent 830cfcf33d
commit 0b419f5084
22 changed files with 559 additions and 72 deletions
@@ -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: