mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Updated test for perms. changes and fixed static issues
This commit is contained in:
@ -376,19 +376,18 @@ class EntityPermissionsTest extends TestCase
|
||||
->assertSee($title);
|
||||
|
||||
$this->put($modelInstance->getUrl('/permissions'), [
|
||||
'restrictions' => [
|
||||
'permissions' => [
|
||||
$roleId => [
|
||||
$permission => 'true',
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas($modelInstance->getTable(), ['id' => $modelInstance->id, 'restricted' => true]);
|
||||
$this->assertDatabaseHas('entity_permissions', [
|
||||
'restrictable_id' => $modelInstance->id,
|
||||
'restrictable_type' => $modelInstance->getMorphClass(),
|
||||
'entity_id' => $modelInstance->id,
|
||||
'entity_type' => $modelInstance->getMorphClass(),
|
||||
'role_id' => $roleId,
|
||||
'action' => $permission,
|
||||
$permission => true,
|
||||
]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user