diff options
| author | historia <[not public]> | 2026-09-15 14:18:14 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-15 14:18:14 -0400 |
| commit | 396c3facb8287b9a34076cae8f3d7b300d366d99 (patch) | |
| tree | 941f280d051fac474fa68ca08318a8d16adc8d0f /internal/validate/casino_test.go | |
| parent | b3568f03e4103dd46db2ccc680fbab0a6454d604 (diff) | |
| download | thehouseoficarus-396c3facb8287b9a34076cae8f3d7b300d366d99.tar.gz | |
fix: atomic saves, casino RNG/config isolation, tick lifecycle
Diffstat (limited to 'internal/validate/casino_test.go')
| -rw-r--r-- | internal/validate/casino_test.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/internal/validate/casino_test.go b/internal/validate/casino_test.go new file mode 100644 index 0000000..9eb94db --- /dev/null +++ b/internal/validate/casino_test.go @@ -0,0 +1,29 @@ +package validate + +import ( + "path/filepath" + "testing" +) + +func TestRoomCasinoValidation(t *testing.T) { + dir := t.TempDir() + writeFile(t, filepath.Join(dir, "rooms", "1.yaml"), `name: Casino +casino_tables: + - id: cards + game: blackjack + min_bet: 10 + max_bet: 5 +casino_machines: + - id: slots + game: slots + payout: .nan + - id: slots + game: slots +`) + issues := validateRooms(newSource(dir)) + for _, message := range []string{"Room 1", "max_bet", "payout", "duplicate casino id"} { + if !containsMsg(issues, message) { + t.Errorf("missing %q in %+v", message, issues) + } + } +} |
