aboutsummaryrefslogtreecommitdiff
path: root/internal/game/casino_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-08-07 05:02:39 -0400
committerhistoria <[not public]>2026-08-07 05:02:39 -0400
commit9a716a7d2ce514f452b425caedc1a9a15cde09f0 (patch)
treede980f16c4af93512a1616e6521275fd62aca542 /internal/game/casino_test.go
parent0f008790f192a491ac3901d54b506b756f57fef8 (diff)
downloadthehouseoficarus-9a716a7d2ce514f452b425caedc1a9a15cde09f0.tar.gz
feat: disconnect forfeits bet and frees up seat
Diffstat (limited to 'internal/game/casino_test.go')
-rw-r--r--internal/game/casino_test.go6
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) {