20 lines
447 B
Go
Raw Normal View History

2019-06-03 09:32:43 +00:00
package arn_test
import (
"testing"
2019-08-25 06:41:59 +00:00
"github.com/akyoto/assert"
2019-06-03 09:32:43 +00:00
"github.com/animenotifier/notify.moe/arn"
)
func TestInventory(t *testing.T) {
inventory := arn.NewInventory("4J6qpK1ve")
2019-08-25 06:41:59 +00:00
assert.Equal(t, len(inventory.Slots), arn.DefaultInventorySlotCount)
2019-06-03 09:32:43 +00:00
assert.False(t, inventory.ContainsItem("pro-account-3"))
err := inventory.AddItem("pro-account-3", 1)
2019-08-25 06:41:59 +00:00
assert.Nil(t, err)
2019-06-03 09:32:43 +00:00
assert.True(t, inventory.ContainsItem("pro-account-3"))
}