summaryrefslogtreecommitdiff
path: root/app/controllers/sparkles/controller_test.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-04-21 12:31:39 -0600
committermo khan <mo@mokhan.ca>2025-04-21 12:31:39 -0600
commitab8075f02f50d8bd0be3c23b87e63f10828528ed (patch)
tree9ba0cdcfaf708bf0a5dec931057f6b65ff12fd8e /app/controllers/sparkles/controller_test.go
parentcb4144edda6d64cd0f3defdadfdbec57de28c27e (diff)
refactor: convert Repository to Repository[T Entity]
Diffstat (limited to 'app/controllers/sparkles/controller_test.go')
-rw-r--r--app/controllers/sparkles/controller_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/sparkles/controller_test.go b/app/controllers/sparkles/controller_test.go
index 17bc338..99fdd69 100644
--- a/app/controllers/sparkles/controller_test.go
+++ b/app/controllers/sparkles/controller_test.go
@@ -15,7 +15,7 @@ import (
func TestSparkles(t *testing.T) {
t.Run("GET /sparkles", func(t *testing.T) {
sparkle, _ := domain.NewSparkle("@tanuki for helping me")
- store := db.NewRepository()
+ store := db.NewRepository[*domain.Sparkle]()
store.Save(sparkle)
mux := http.NewServeMux()
@@ -43,7 +43,7 @@ func TestSparkles(t *testing.T) {
t.Run("POST /sparkles", func(t *testing.T) {
t.Run("saves a new sparkle", func(t *testing.T) {
- repository := db.NewRepository()
+ repository := db.NewRepository[*domain.Sparkle]()
mux := http.NewServeMux()
controller := New(repository)
controller.MountTo(mux)