Use akyoto/assert for tests

This commit is contained in:
2019-08-25 15:41:59 +09:00
parent 8ff4e010fb
commit 3d89d2787a
12 changed files with 54 additions and 63 deletions

View File

@ -3,18 +3,17 @@ package arn_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/akyoto/assert"
"github.com/animenotifier/notify.moe/arn"
)
func TestInventory(t *testing.T) {
inventory := arn.NewInventory("4J6qpK1ve")
assert.Len(t, inventory.Slots, arn.DefaultInventorySlotCount)
assert.Equal(t, len(inventory.Slots), arn.DefaultInventorySlotCount)
assert.False(t, inventory.ContainsItem("pro-account-3"))
err := inventory.AddItem("pro-account-3", 1)
assert.NoError(t, err)
assert.Nil(t, err)
assert.True(t, inventory.ContainsItem("pro-account-3"))
}