From 0e60567a7a0addb9421769ee7be7853bfa8788cb Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 19 Sep 2026 03:15:59 -0400 Subject: refactor: simplifcation, change how rooms are stored in player yaml, remove legacy code --- internal/casino/hardening_casino_validate_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'internal/casino/hardening_casino_validate_test.go') diff --git a/internal/casino/hardening_casino_validate_test.go b/internal/casino/hardening_casino_validate_test.go index 1d27d54..dfec79b 100644 --- a/internal/casino/hardening_casino_validate_test.go +++ b/internal/casino/hardening_casino_validate_test.go @@ -162,13 +162,13 @@ func TestRoomRejectsASecondEntryForOneGame(t *testing.T) { if ok != nil { t.Fatalf("one entry per game rejected: %v", ok) } - // A legacy slots table and a slots machine both answer to "slots". - legacy := ValidateRoomConfigs( - []TableConfig{{ID: "legacy_slots", Game: GameSlots}}, - []MachineConfig{{ID: "slots", Game: GameSlots}}, - ) - if legacy == nil || !strings.Contains(legacy.Error(), "duplicate casino game") { - t.Fatalf("legacy slots table plus a slots machine accepted: %v", legacy) + // Slots are machines only: a slots entry under casino_tables is rejected + // outright rather than treated as a machine. + if legacy := ValidateRoomConfigs( + []TableConfig{{ID: "slots_table", Game: GameSlots}}, + nil, + ); legacy == nil { + t.Fatal("slots table accepted; slots must be declared under casino_machines") } // Two machines of the same variant are equally unreachable. twoVariants := ValidateRoomConfigs(nil, []MachineConfig{ -- cgit v1.2.3