aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/hardening_casino_validate_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-19 03:15:59 -0400
committerhistoria <[not public]>2026-09-19 03:15:59 -0400
commit0e60567a7a0addb9421769ee7be7853bfa8788cb (patch)
tree7645112db0e4eae95b8a83c1e4f9aab38bede655 /internal/casino/hardening_casino_validate_test.go
parentcc33072eced3d5460512c09c42ec4531c807d7af (diff)
downloadthehouseoficarus-0e60567a7a0addb9421769ee7be7853bfa8788cb.tar.gz
refactor: simplifcation, change how rooms are stored in player yaml, remove legacy code
Diffstat (limited to 'internal/casino/hardening_casino_validate_test.go')
-rw-r--r--internal/casino/hardening_casino_validate_test.go14
1 files changed, 7 insertions, 7 deletions
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{