diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-24 16:05:12 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-24 16:05:12 -0600 |
| commit | 9d441a3be09461107858afd04e3ccaea7e8e4a4b (patch) | |
| tree | 04cd69be30318ee998749301d478310f861f93fb /app/domain/entity_test.go | |
| parent | f6ad289b8d27219c47aefec24113ccb02a62dd99 (diff) | |
refactor: rename entity
Diffstat (limited to 'app/domain/entity_test.go')
| -rw-r--r-- | app/domain/entity_test.go | 7 |
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()) }) }) } |
