Deflake TestBuyTakesCardAndRefills by pinning an effect-less shop pet.

This commit is contained in:
Greyson Parrelli
2026-07-23 08:53:15 -04:00
parent f8b1337def
commit 14a8fd1032
+3
View File
@@ -56,6 +56,9 @@ func TestLobbyStartsWhenFull(t *testing.T) {
func TestBuyTakesCardAndRefills(t *testing.T) {
g, _, _ := testGame(t)
p := current(g)
// Pin the slot to an effect-less pet: a random draw could be a buy-apple
// pet (e.g. Otter), which would add an apple and make len(deck) != 1.
g.ShopRow[0] = g.pet("Plain", 3)
want := g.ShopRow[0]
deckBefore := len(g.ShopDecks[0])
if err := g.Buy(p.ID, 0); err != nil {