dynamo-browse/test/testdynamo/helpers.go
Leon Mika f65c5778a9
issue-50: fixed package name (#52)
Changed package name from github.com/lmika/audax to github.com/lmika/dynamo-browse
2023-04-17 08:31:03 +10:00

17 lines
382 B
Go

package testdynamo
import (
"testing"
"github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue"
"github.com/lmika/dynamo-browse/internal/dynamo-browse/models"
"github.com/stretchr/testify/assert"
)
func TestRecordAsItem(t *testing.T, item map[string]interface{}) models.Item {
m, err := attributevalue.MarshalMap(item)
assert.NoError(t, err)
return models.Item(m)
}