diff options
| author | mo khan <mo@mokhan.ca> | 2025-04-17 14:08:18 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-04-17 14:08:18 -0600 |
| commit | 62c24d360745ef8778a322c276a9ad577dfc7713 (patch) | |
| tree | a93eb5de35fb283bfa014bd3c23094017a2e72c4 /app/controllers/dashboard/controller_test.go | |
| parent | 81d3482b6937617ba3fd778a42d2fbbbf0b8e2b7 (diff) | |
refactor: move context keys to key package
Diffstat (limited to 'app/controllers/dashboard/controller_test.go')
| -rw-r--r-- | app/controllers/dashboard/controller_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/dashboard/controller_test.go b/app/controllers/dashboard/controller_test.go index ff2482f..b8199c4 100644 --- a/app/controllers/dashboard/controller_test.go +++ b/app/controllers/dashboard/controller_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/assert" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/domain" + "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/key" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/test" ) @@ -29,7 +30,7 @@ func TestController(t *testing.T) { t.Run("when authenticated", func(t *testing.T) { t.Run("renders a dashboard page", func(t *testing.T) { - ctx := CurrentUserKey.With(t.Context(), &domain.User{}) + ctx := key.CurrentUserKey.With(t.Context(), &domain.User{}) r, w := test.RequestResponse("GET", "/dashboard", test.WithContext(ctx)) mux.ServeHTTP(w, r) |
