diff options
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/sparkles/controller_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/sparkles/controller_test.go b/app/controllers/sparkles/controller_test.go index d2469a7..e825343 100644 --- a/app/controllers/sparkles/controller_test.go +++ b/app/controllers/sparkles/controller_test.go @@ -8,6 +8,7 @@ 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" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/cfg" @@ -35,7 +36,7 @@ func (f *FailingResponseWriter) Write([]byte) (int, error) { func TestSparkles(t *testing.T) { t.Run("GET /sparkles", func(t *testing.T) { sparkle, _ := domain.NewSparkle("@tanuki for helping me") - store := db.NewRepository[*domain.Sparkle]() + store := db.NewRepository[*domain.Sparkle](event.New[*domain.Sparkle]()) store.Save(t.Context(), sparkle) mux := http.NewServeMux() @@ -64,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 := domain.NewUser(domain.WithID[*domain.User](domain.ID("1"))) - repository := db.NewRepository[*domain.Sparkle]() + repository := db.NewRepository[*domain.Sparkle](event.New[*domain.Sparkle]()) t.Run("when the user is authorized", func(t *testing.T) { mux := http.NewServeMux() |
