From 2ebbc02752961888e7ada12306200e452a7845c0 Mon Sep 17 00:00:00 2001 From: mo khan Date: Thu, 24 Jul 2025 16:22:48 -0600 Subject: refactor: remove NewSparkle function --- app/db/in_memory_repository_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/db') diff --git a/app/db/in_memory_repository_test.go b/app/db/in_memory_repository_test.go index 8e1e017..5bb220e 100644 --- a/app/db/in_memory_repository_test.go +++ b/app/db/in_memory_repository_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/x" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/domain" ) @@ -129,8 +130,7 @@ func TestInMemoryRepository(t *testing.T) { t.Run("Find", func(t *testing.T) { t.Run("when the entity exists", func(t *testing.T) { - sparkle, err := domain.NewSparkle("@tanuki for testing this func") - require.NoError(t, err) + sparkle := x.New[*domain.Sparkle](domain.WithText("@tanuki for testing this func")) require.NoError(t, storage.Save(t.Context(), sparkle)) result := storage.Find(t.Context(), sparkle.ID) -- cgit v1.2.3