aboutsummaryrefslogtreecommitdiff
path: root/internal/game/casino_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/casino_test.go')
-rw-r--r--internal/game/casino_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/game/casino_test.go b/internal/game/casino_test.go
index d7b5ae9..0394437 100644
--- a/internal/game/casino_test.go
+++ b/internal/game/casino_test.go
@@ -36,12 +36,11 @@ func TestExecuteBetRejectsInvalidMachineArgs(t *testing.T) {
t.Fatalf("bet %v: expected usage error, got %q", args, string(conn.data))
}
}
- // A bare bet at a machine reaches the spin path instead of erroring.
- g.Casino.SetMachineBet(1, "slots", "alice", 10)
+ // A bet amount at a machine sets the wager and immediately spins.
conn.data = nil
- g.executeBet(sess, nil, "bet")
+ g.executeBet(sess, []string{"10"}, "bet 10")
if !strings.Contains(string(conn.data), "You don't have enough chips and credits") {
- t.Fatalf("bare bet should attempt a spin, got %q", string(conn.data))
+ t.Fatalf("bet 10 should attempt an auto-spin and fail at the empty wallet, got %q", string(conn.data))
}
}