aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/baccarat_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/casino/baccarat_test.go')
-rw-r--r--internal/casino/baccarat_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/casino/baccarat_test.go b/internal/casino/baccarat_test.go
index 49e8fdd..12dc07c 100644
--- a/internal/casino/baccarat_test.go
+++ b/internal/casino/baccarat_test.go
@@ -1,6 +1,7 @@
package casino
import (
+ "strings"
"testing"
)
@@ -266,7 +267,7 @@ func TestBaccaratTiePushesAndPaysJackpotColor(t *testing.T) {
t.Fatalf("payouts alice=%d bob=%d, want 100 (push)/900 (8:1)", wa.paid, wb.paid)
}
for _, event := range events {
- if event.PrivateTo == "bob" && event.PrivateMessage == "You win! +900 credits" && event.Color != "casino_jackpot_win" {
+ if event.PrivateTo == "bob" && strings.Contains(event.PrivateMessage, "WIN | Net +800 credits | 900 returned") && event.Color != "casino_jackpot_win" {
t.Fatalf("tie win color=%q, want casino_jackpot_win", event.Color)
}
}
@@ -354,10 +355,10 @@ func TestBaccaratMenuAndActions(t *testing.T) {
menu = event.Menu
}
}
- if menu == nil || !menu.ShowBalance || menu.Heading != "New baccarat hand! Place your bet." {
+ if menu == nil || !menu.ShowBalance || !strings.Contains(menu.Heading, "Baccarat / Commission | Next hand | Limits") {
t.Fatalf("join menu=%+v, want a baccarat betting menu", menu)
}
- if len(menu.Commands) != 3 || menu.Commands[0].Command != "bet <amount>" || menu.Commands[2].Command != "stop" {
+ if len(menu.Commands) != 4 || menu.Commands[0].Command != "bet 1 banker" || menu.Commands[2].Command != "stop" {
t.Fatalf("baccarat menu commands=%+v", menu.Commands)
}
if events := table.action("alice", "hit"); !hasMessage(events, "no player actions") {