Write test to check rover has item in inventory

This commit is contained in:
Marc Di Luzio 2020-06-26 23:37:10 +01:00
parent f0d40cc46c
commit 71c2c09270
2 changed files with 18 additions and 0 deletions

View file

@ -164,4 +164,9 @@ func TestWorld_RoverStash(t *testing.T) {
tile, err := world.Atlas.GetTile(pos)
assert.NoError(t, err, "Failed to get tile")
assert.Equal(t, objects.Empty, tile, "Stash failed to remove object from atlas")
inv, err := world.RoverInventory(a)
assert.NoError(t, err, "Failed to get inventory")
assert.Equal(t, Item{Type: objects.SmallRock}, inv[0])
}