diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-28 14:26:19 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-28 14:26:19 -0600 |
| commit | e9546b40c8befabda26c1598c124a6ee2a8d2b8f (patch) | |
| tree | c7b09c0c1c821b516e56b5ac3637dc07dc97d039 /app/controllers/sparkles | |
| parent | 1de6a34a55c2e8b7d50945984acb45e7809f6a37 (diff) | |
refactor: always provide a user in the request context
Diffstat (limited to 'app/controllers/sparkles')
| -rw-r--r-- | app/controllers/sparkles/controller_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/sparkles/controller_test.go b/app/controllers/sparkles/controller_test.go index 8a1717d..0619b99 100644 --- a/app/controllers/sparkles/controller_test.go +++ b/app/controllers/sparkles/controller_test.go @@ -44,9 +44,10 @@ func TestSparkles(t *testing.T) { t.Run("POST /sparkles", func(t *testing.T) { t.Run("when a user is logged in", func(t *testing.T) { - currentUser := &domain.User{} + currentUser := domain.NewUser(domain.WithID[*domain.User](domain.ID("1"))) t.Run("saves a new sparkle", func(t *testing.T) { + repository := db.NewRepository[*domain.Sparkle]() mux := http.NewServeMux() controller := New(repository) |
