Added arn to the main repository

This commit is contained in:
2019-06-03 18:32:43 +09:00
parent cf258573a8
commit 29a48d94a5
465 changed files with 15968 additions and 288 deletions

20
arn/Inventory_test.go Normal file
View File

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