diff options
Diffstat (limited to 'internal/casino/correct_audit_fixes_test.go')
| -rw-r--r-- | internal/casino/correct_audit_fixes_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/casino/correct_audit_fixes_test.go b/internal/casino/correct_audit_fixes_test.go index e5e3bd3..dc33c47 100644 --- a/internal/casino/correct_audit_fixes_test.go +++ b/internal/casino/correct_audit_fixes_test.go @@ -21,3 +21,14 @@ func TestCrapsShooterChangeResetsHand(t *testing.T) { t.Fatalf("new shooter inherited hand: point=%d rolled=%v made=%v seen=%v", tb.point, tb.rolled, tb.made, tb.seen) } } + +// Regression: a video-poker cabinet addressed by an ID that collides with a +// machine variant/game name validated but was unreachable (the machine won the +// address lookup). +func TestVideoPokerCabinetIDCollisionIsRejected(t *testing.T) { + machines := []MachineConfig{{ID: "m1", Game: GameSlots, Variant: "x"}} + tables := []TableConfig{{ID: "x", Game: GameVideoPoker}} + if err := ValidateRoomConfigs(tables, machines); err == nil { + t.Fatal("cabinet ID colliding with a machine variant was accepted; the cabinet would be unreachable") + } +} |
