summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/db/in_memory_repository_test.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/app/db/in_memory_repository_test.go b/app/db/in_memory_repository_test.go
index 9c44fa7..cfbab41 100644
--- a/app/db/in_memory_repository_test.go
+++ b/app/db/in_memory_repository_test.go
@@ -98,18 +98,13 @@ func TestInMemoryRepository(t *testing.T) {
Reason: "because",
}))
- t.Run("prevents unintended modifications", func(t *testing.T) {
+ t.Run("returns all the items", func(t *testing.T) {
items := repository.All(t.Context())
- require.Equal(t, 1, len(items))
-
- sparkle := items[0]
- sparkle.Reason = "haha"
-
- assert.Equal(t, "because", repository.All(t.Context())[0].Reason)
- })
- t.Run("prevents race conditions", func(t *testing.T) {
- t.Skip()
+ require.NotNil(t, items)
+ require.Equal(t, 1, len(items))
+ assert.Equal(t, "@tanuki", items[0].Sparklee)
+ assert.Equal(t, "because", items[0].Reason)
})
})