diff options
| author | historia <[not public]> | 2026-10-01 22:47:41 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-01 22:47:41 -0400 |
| commit | 8eea0e4e06a4aaa6a18edabd9897d3bea1ea2ca0 (patch) | |
| tree | 63698c0618f382a553d4558a33e3d2087039c378 /internal/casino/money_regression_test.go | |
| parent | 6d9908b29c8187196d23b126b1165c7e0bd0fc76 (diff) | |
| download | thehouseoficarus-8eea0e4e06a4aaa6a18edabd9897d3bea1ea2ca0.tar.gz | |
feat: consistent wager outcome table across casino games
Diffstat (limited to 'internal/casino/money_regression_test.go')
| -rw-r--r-- | internal/casino/money_regression_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/casino/money_regression_test.go b/internal/casino/money_regression_test.go index 3f1359e..2f56e0f 100644 --- a/internal/casino/money_regression_test.go +++ b/internal/casino/money_regression_test.go @@ -254,7 +254,7 @@ func TestSlotsStakeResolvesOnlyAfterFullRound(t *testing.T) { // would silently erase the failed round's evidence and drop the refund. func TestSlotsSecondSpinDoesNotResolveFailedPayoutStake(t *testing.T) { machine := newMachine(1, MachineConfig{ID: "slots", Game: GameSlots, SpinTicks: 1}, newTestRand()) - wallet := &failingPayoutWallet{testWallet{credits: 100}} + wallet := &recoveringSettlementWallet{testWallet: testWallet{credits: 100}, fail: true} machine.join("alice") machine.setBet("alice", 10, wallet) machine.spin = &SlotSpin{Payout: 20} // winning spin the wallet refuses to pay @@ -265,7 +265,9 @@ func TestSlotsSecondSpinDoesNotResolveFailedPayoutStake(t *testing.T) { t.Fatal("setup: a failed payout must leave the stake open") } - // A second, losing round must not resolve the first (still-open) stake. + // Storage recovers. A second, losing round must atomically resolve only + // its own stake, not the first (still-open) stake. + wallet.fail = false machine.setBet("alice", 10, wallet) machine.spin = &SlotSpin{} for i := 0; i < 20 && machine.phase != machineReady; i++ { |
