diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-30 12:10:43 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-30 12:10:43 -0600 |
| commit | ebb003ef2beaeee61104d6b88a342c5c9fa73b51 (patch) | |
| tree | 7b72d99a6257b636a9a844602f469975853e3b0e /app/controllers | |
| parent | a9a093fcc7a4e0c65f363eb2e2439631062de645 (diff) | |
| parent | d4f4f72b5ff586f2ff440f19f61d2fe48be89a37 (diff) | |
Merge branch 'secure-repository' into 'main'
Authorize reading/writing Sparkles using SpiceDB
See merge request gitlab-org/software-supply-chain-security/authorization/sparkled!20
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/sparkles/controller_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/sparkles/controller_test.go b/app/controllers/sparkles/controller_test.go index 5c37a11..71e1d96 100644 --- a/app/controllers/sparkles/controller_test.go +++ b/app/controllers/sparkles/controller_test.go @@ -8,7 +8,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/xlgmokha/x/pkg/event" "github.com/xlgmokha/x/pkg/serde" "github.com/xlgmokha/x/pkg/test" "github.com/xlgmokha/x/pkg/x" @@ -37,7 +36,7 @@ func (f *FailingResponseWriter) Write([]byte) (int, error) { func TestSparkles(t *testing.T) { t.Run("GET /sparkles", func(t *testing.T) { sparkle := x.New[*domain.Sparkle](domain.WithText("@tanuki for helping me")) - store := db.NewRepository[*domain.Sparkle](event.New[*domain.Sparkle]()) + store := db.NewRepository[*domain.Sparkle]() store.Save(t.Context(), sparkle) mux := http.NewServeMux() @@ -66,7 +65,7 @@ func TestSparkles(t *testing.T) { t.Run("POST /sparkles", func(t *testing.T) { t.Run("when a user is authenticated", func(t *testing.T) { currentUser := x.New[*domain.User](domain.WithID[*domain.User](domain.ID("1"))) - repository := db.NewRepository[*domain.Sparkle](event.New[*domain.Sparkle]()) + repository := db.NewRepository[*domain.Sparkle]() t.Run("when the user is authorized", func(t *testing.T) { mux := http.NewServeMux() |
