summaryrefslogtreecommitdiff
path: root/app/domain/entity_test.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-24 16:05:12 -0600
committermo khan <mo@mokhan.ca>2025-07-24 16:05:12 -0600
commit9d441a3be09461107858afd04e3ccaea7e8e4a4b (patch)
tree04cd69be30318ee998749301d478310f861f93fb /app/domain/entity_test.go
parentf6ad289b8d27219c47aefec24113ccb02a62dd99 (diff)
refactor: rename entity
Diffstat (limited to 'app/domain/entity_test.go')
-rw-r--r--app/domain/entity_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/domain/entity_test.go b/app/domain/entity_test.go
index ee3fbae..3f4c788 100644
--- a/app/domain/entity_test.go
+++ b/app/domain/entity_test.go
@@ -9,9 +9,9 @@ import (
"github.com/xlgmokha/x/pkg/x"
)
-func TestDefaultEntity(t *testing.T) {
+func TestEntity(t *testing.T) {
type example struct {
- defaultEntity
+ entity
}
t.Run("GetID", func(t *testing.T) {
@@ -48,7 +48,8 @@ func TestDefaultEntity(t *testing.T) {
require.NotNil(t, reference)
require.NoError(t, reference.Validate())
require.NoError(t, reference.ValidateAll())
- assert.Equal(t, fmt.Sprintf("object_type:\"entity\" object_id:\"%s\"", example.ID), reference.String())
+ assert.Equal(t, example.ID.String(), reference.GetObjectId())
+ assert.Equal(t, "entity", reference.GetObjectType())
})
})
}