summaryrefslogtreecommitdiff
path: root/app/db
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-24 16:22:48 -0600
committermo khan <mo@mokhan.ca>2025-07-24 16:22:48 -0600
commit2ebbc02752961888e7ada12306200e452a7845c0 (patch)
tree1fe666f92eb7baad7552152dd5b9aaede3198161 /app/db
parent9d441a3be09461107858afd04e3ccaea7e8e4a4b (diff)
refactor: remove NewSparkle function
Diffstat (limited to 'app/db')
-rw-r--r--app/db/in_memory_repository_test.go4
1 files changed, 2 insertions, 2 deletions
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)