diff options
Diffstat (limited to 'app/controllers/sparkles/controller_test.go')
| -rw-r--r-- | app/controllers/sparkles/controller_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/sparkles/controller_test.go b/app/controllers/sparkles/controller_test.go index b2c7752..8a1717d 100644 --- a/app/controllers/sparkles/controller_test.go +++ b/app/controllers/sparkles/controller_test.go @@ -17,7 +17,7 @@ func TestSparkles(t *testing.T) { t.Run("GET /sparkles", func(t *testing.T) { sparkle, _ := domain.NewSparkle("@tanuki for helping me") store := db.NewRepository[*domain.Sparkle]() - store.Save(sparkle) + store.Save(t.Context(), sparkle) mux := http.NewServeMux() controller := New(store) @@ -75,8 +75,8 @@ func TestSparkles(t *testing.T) { }) t.Run("saves the sparkle to the db", func(t *testing.T) { - assert.Equal(t, 1, len(repository.All())) - item := repository.All()[0] + assert.Equal(t, 1, len(repository.All(t.Context()))) + item := repository.All(t.Context())[0] assert.Equal(t, "@tanuki", item.Sparklee) assert.Equal(t, "for reviewing my code!", item.Reason) |
