diff options
| author | historia <[not public]> | 2026-09-24 20:06:41 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-24 20:07:31 -0400 |
| commit | 13db3e50cb6e29eedbf25416e5284bf08b0adefb (patch) | |
| tree | d5e9b99030b25cc7fc102288b694c133f8832f84 /internal/game/quit_casino_test.go | |
| parent | d114c747a7672c7e4daab3a5b5f1b2f066ebc912 (diff) | |
| download | thehouseoficarus-13db3e50cb6e29eedbf25416e5284bf08b0adefb.tar.gz | |
feat: casino table ux: aliases, rebet hints, deadline notifications, spectator mode
Diffstat (limited to 'internal/game/quit_casino_test.go')
| -rw-r--r-- | internal/game/quit_casino_test.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/game/quit_casino_test.go b/internal/game/quit_casino_test.go index 02dadb0..6ffe2d5 100644 --- a/internal/game/quit_casino_test.go +++ b/internal/game/quit_casino_test.go @@ -267,12 +267,11 @@ func TestQuitNowAtMachineHoldsUntilLogout(t *testing.T) { } } -// Stop and quit share one departure path: both refuse mid-round and both -// leave gracefully between rounds. -func TestStopMatchesQuitCasinoPolicy(t *testing.T) { +// Stop queues a departure; quit still refuses a committed round. +func TestStopQueuesDepartureWithoutForfeiting(t *testing.T) { cfg := casino.TableConfig{ID: "blackjack", Game: casino.GameBlackjack, MinBet: 1, MaxBet: 100} - // Mid-round: stop refuses just like quit. + // Mid-round: stop queues a departure without removing or forfeiting. g, sess := quitTestGame(t) g.Casino.Join(1, cfg, "alice") g.Casino.Join(1, cfg, "bob") @@ -281,8 +280,8 @@ func TestStopMatchesQuitCasinoPolicy(t *testing.T) { conn := sess.Conn.(*casinoTestConn) conn.data = nil g.executeStop(sess, nil, "stop") - if !strings.Contains(string(conn.data), "middle of a blackjack round") { - t.Fatalf("expected mid-round refusal, got %q", string(conn.data)) + if !strings.Contains(string(conn.data), "leave after this round") { + t.Fatalf("expected queued departure, got %q", string(conn.data)) } if _, playing := g.Casino.Participation("alice"); !playing { t.Fatal("stop mid-round removed the player from the table") |
