2022-03-23 11:02:46 +00:00
|
|
|
package testdynamo
|
|
|
|
|
|
|
|
import (
|
2022-03-24 21:17:52 +00:00
|
|
|
"testing"
|
|
|
|
|
2022-03-23 11:02:46 +00:00
|
|
|
"github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue"
|
2023-04-16 22:31:03 +00:00
|
|
|
"github.com/lmika/dynamo-browse/internal/dynamo-browse/models"
|
2022-03-23 11:02:46 +00:00
|
|
|
"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)
|
|
|
|
}
|