diff options
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()) }) }) } |
