From 9a716a7d2ce514f452b425caedc1a9a15cde09f0 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 7 Aug 2026 05:02:39 -0400 Subject: feat: disconnect forfeits bet and frees up seat --- internal/game/casino_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/game/casino_test.go') diff --git a/internal/game/casino_test.go b/internal/game/casino_test.go index 8affe29..9f31a37 100644 --- a/internal/game/casino_test.go +++ b/internal/game/casino_test.go @@ -42,6 +42,12 @@ func TestExecuteBetRejectsInvalidMachineArgs(t *testing.T) { if !strings.Contains(string(conn.data), "You don't have enough chips and credits") { t.Fatalf("bet 10 should attempt an auto-spin and fail at the empty wallet, got %q", string(conn.data)) } + // Bet max with an empty wallet is rejected before any wager is attempted. + conn.data = nil + g.executeBet(sess, []string{"max"}, "bet max") + if !strings.Contains(string(conn.data), "You don't have any chips or credits to bet.") { + t.Fatalf("bet max with empty wallet: expected no-funds message, got %q", string(conn.data)) + } } func TestExecuteBetParsesBaccaratSpots(t *testing.T) { -- cgit v1.2.3