Update shopfront_test.go
This commit is contained in:
parent
58185a6339
commit
30072f9d6f
1 changed files with 4 additions and 4 deletions
|
@ -20,12 +20,12 @@ func TestShopfront(t *testing.T) {
|
||||||
|
|
||||||
items, err := c.GetItems(ctx, []shopfront.ItemID{1, 2, 3, 4}, 42)
|
items, err := c.GetItems(ctx, []shopfront.ItemID{1, 2, 3, 4}, 42)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Equal(t, items, []shopfront.Item{
|
require.Equal(t, []shopfront.Item{
|
||||||
{},
|
{},
|
||||||
{},
|
{},
|
||||||
{},
|
{},
|
||||||
{},
|
{},
|
||||||
})
|
}, items)
|
||||||
|
|
||||||
require.NoError(t, c.RecordView(ctx, 3, 42))
|
require.NoError(t, c.RecordView(ctx, 3, 42))
|
||||||
require.NoError(t, c.RecordView(ctx, 2, 42))
|
require.NoError(t, c.RecordView(ctx, 2, 42))
|
||||||
|
@ -34,12 +34,12 @@ func TestShopfront(t *testing.T) {
|
||||||
|
|
||||||
items, err = c.GetItems(ctx, []shopfront.ItemID{1, 2, 3, 4}, 42)
|
items, err = c.GetItems(ctx, []shopfront.ItemID{1, 2, 3, 4}, 42)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Equal(t, items, []shopfront.Item{
|
require.Equal(t, []shopfront.Item{
|
||||||
{},
|
{},
|
||||||
{ViewCount: 2, Viewed: true},
|
{ViewCount: 2, Viewed: true},
|
||||||
{ViewCount: 1, Viewed: true},
|
{ViewCount: 1, Viewed: true},
|
||||||
{},
|
{},
|
||||||
})
|
}, items)
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkShopfront(b *testing.B) {
|
func BenchmarkShopfront(b *testing.B) {
|
||||||
|
|
Loading…
Reference in a new issue