diff options
Diffstat (limited to 'internal/game/casino_test.go')
| -rw-r--r-- | internal/game/casino_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
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) { |
