From 612e429de438821ae8e099d6b54f87c11ff6c1b5 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 3 Aug 2026 14:08:09 -0400 Subject: refactor: casino game slop refactor --- internal/casino/manager_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'internal/casino/manager_test.go') diff --git a/internal/casino/manager_test.go b/internal/casino/manager_test.go index 245133d..8d6dd3d 100644 --- a/internal/casino/manager_test.go +++ b/internal/casino/manager_test.go @@ -64,6 +64,25 @@ func TestMultiplePlayersWaitForBets(t *testing.T) { m.Bet(1, "slots", "bob", 10, wb) } +func TestTableBettingIgnoresDisconnected(t *testing.T) { + m := NewManager(1) + cfg := TableConfig{ID: "slots", Game: GameSlots, BettingTicks: 20} + m.Join(1, cfg, "alice") + m.Join(1, cfg, "bob") + m.MarkDisconnected("bob") + w := &testWallet{credits: 100} + events := m.Bet(1, "slots", "alice", 10, w) + found := false + for _, event := range events { + if event.Type == EventRoundStarted { + found = true + } + } + if !found { + t.Fatal("disconnected player stalled the table's round") + } +} + func TestMachineAutobetCountdownAndStop(t *testing.T) { m := NewManager(1) cfg := MachineConfig{ID: "slots", Game: GameSlots, SpinTicks: 1} -- cgit v1.2.3