Deflake TestBuyTakesCardAndRefills by pinning an effect-less shop pet.
This commit is contained in:
@@ -56,6 +56,9 @@ func TestLobbyStartsWhenFull(t *testing.T) {
|
|||||||
func TestBuyTakesCardAndRefills(t *testing.T) {
|
func TestBuyTakesCardAndRefills(t *testing.T) {
|
||||||
g, _, _ := testGame(t)
|
g, _, _ := testGame(t)
|
||||||
p := current(g)
|
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]
|
want := g.ShopRow[0]
|
||||||
deckBefore := len(g.ShopDecks[0])
|
deckBefore := len(g.ShopDecks[0])
|
||||||
if err := g.Buy(p.ID, 0); err != nil {
|
if err := g.Buy(p.ID, 0); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user