- $this->assertDatabaseHas('entity_permissions', ['restrictable_id' => $child->id, 'action' => 'view', 'role_id' => $editorRole->id]);
- $this->assertDatabaseHas('entity_permissions', ['restrictable_id' => $child->id, 'action' => 'update', 'role_id' => $editorRole->id]);
+ $this->assertDatabaseHas('entity_permissions', [
+ 'entity_type' => 'book',
+ 'entity_id' => $child->id,
+ 'role_id' => $editorRole->id,
+ 'view' => true, 'update' => true, 'create' => false, 'delete' => false,
+ ]);
+ }
+
+ public function test_permission_page_has_a_warning_about_no_cascading()
+ {
+ $shelf = $this->entities->shelf();
+ $resp = $this->asAdmin()->get($shelf->getUrl('/permissions'));
+ $resp->assertSeeText('Permissions on shelves do not automatically cascade to contained books.');