summaryrefslogtreecommitdiff
path: root/app/db/in_memory_repository_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/db/in_memory_repository_test.go')
-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)