diff options
| author | historia <[not public]> | 2026-09-29 19:48:32 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-29 19:48:32 -0400 |
| commit | ffc7b582e9c14fdc2e579b9239b5ff7ad9a0d90a (patch) | |
| tree | e286210755094b41025f2947e412e05e59ec2ac9 /internal/game/roulette_test.go | |
| parent | 624626b9a10ae47cf7d5f6e91765570ed759bd74 (diff) | |
| download | thehouseoficarus-ffc7b582e9c14fdc2e579b9239b5ff7ad9a0d90a.tar.gz | |
feat: roulette history tracker
Diffstat (limited to 'internal/game/roulette_test.go')
| -rw-r--r-- | internal/game/roulette_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/internal/game/roulette_test.go b/internal/game/roulette_test.go index e581435..7b83807 100644 --- a/internal/game/roulette_test.go +++ b/internal/game/roulette_test.go @@ -173,3 +173,23 @@ func TestCasinoTestPortalAuthoredContract(t *testing.T) { } } } + +// A wager must not re-send the betting board; the board arrives on join, +// after settlement via the next-spin menu, or on an explicit "table". +func TestRouletteBetDoesNotResendBoard(t *testing.T) { + g, sess, conn := uxCasinoGame(t) + cfg := casino.TableConfig{ID: "roulette", Game: casino.GameRoulette} + g.emitCasinoEvents(g.Casino.Join(1, cfg, sess.Player.Name)) + if !strings.Contains(string(conn.data), "1to12") { + t.Fatalf("join did not draw the board: %q", conn.data) + } + conn.data = nil + g.executeBet(sess, []string{"10", "on", "red"}, "bet 10 on red") + text := string(conn.data) + if strings.Contains(text, "1to12") { + t.Fatalf("placing a wager redrew the board: %q", text) + } + if !strings.Contains(text, "You bet 10 on red") { + t.Fatalf("missing wager confirmation: %q", text) + } +} |
