feat(fees): adult rates for 2026-07 to 2026-12, default 600
- Default adult monthly rate 700 -> 600 CZK - 2026-07 and 2026-08 set to 0; 2026-09 through 2026-12 added at 600 - Single-session fee is capped at the month's rate, so a 0-rate month is free for one session as well - Mirrored in Go and legacy Python; new calculate_fee parity fixtures Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,9 +26,11 @@ func TestCalculateFee(t *testing.T) {
|
||||
// Zero attendance always returns 0.
|
||||
{"zero short-circuits", 0, "2026-05", 0},
|
||||
{"zero empty month", 0, "", 0},
|
||||
// Single practice returns AdultFeeSingle regardless of month.
|
||||
// Single practice returns AdultFeeSingle, capped at the month's rate.
|
||||
{"single practice", 1, "2026-05", AdultFeeSingle},
|
||||
{"single ignores monthKey", 1, "unknown", AdultFeeSingle},
|
||||
{"single unknown month", 1, "unknown", AdultFeeSingle},
|
||||
{"single in free month is free", 1, "2026-07", 0},
|
||||
{"two in free month is free", 2, "2026-08", 0},
|
||||
// Two+ practices for a configured month: must use the map value, not the default.
|
||||
// Expected values are read from AdultFeeMonthlyRate so this test stays correct
|
||||
// when rates are updated — the assertion verifies dispatch logic, not rate values.
|
||||
|
||||
Reference in New Issue
Block a user