summaryrefslogtreecommitdiff
path: root/app/controllers/sparkles
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-05-28 18:31:00 -0600
committermo khan <mo@mokhan.ca>2025-05-28 18:31:00 -0600
commitcf1050dba0f0b0b26d18ce45ae2c8821153759bd (patch)
treee3f67d0f2c47015d48f725cb9afb55282b5617c2 /app/controllers/sparkles
parent6951a69bff4d633b7fa8805e916c25b204373d9d (diff)
parente5bc1eb2b71d46958088f1c62e69e1074e9f8026 (diff)
Merge branch '11/x-jwt-payload' into 'main'
Read trusted identity information from envoy headers See merge request gitlab-org/software-supply-chain-security/authorization/sparkled!14
Diffstat (limited to 'app/controllers/sparkles')
-rw-r--r--app/controllers/sparkles/controller_test.go3
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)