Skip to content
This repository was archived by the owner on Feb 18, 2023. It is now read-only.

Commit ca6549b

Browse files
committed
test(role): add uuid entity fill creation test
1 parent 7a68acc commit ca6549b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/Unit/Entities/RoleTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,14 @@ function test_it_syncs_permissions_by_array_of_uuids()
5151
});
5252
}
5353

54+
function test_it_can_fill_uuid_at_creation()
55+
{
56+
$uuid = '84e28c10-8991-11e7-ad89-056674746d73';
57+
58+
$roleNotFilled = factory(Role::class)->create();
59+
$this->assertNotEquals($uuid, $roleNotFilled->uuid);
60+
61+
$roleFilled = factory(Role::class)->create(['uuid' => $uuid]);
62+
$this->assertEquals($uuid, $roleFilled->uuid);
63+
}
5464
}

0 commit comments

Comments
 (0)