]> BookStack Code Mirror - bookstack/blobdiff - tests/Uploads/AttachmentTest.php
Add the "Create Shelf" resp. "Create Book" to the home view
[bookstack] / tests / Uploads / AttachmentTest.php
index 0d51e050fa6c421c4d6593e94570687055f42a49..12b254d00a4c84ac87877d8e3e49917163f7c071 100644 (file)
@@ -223,7 +223,7 @@ class AttachmentTest extends TestCase
     {
         $admin = $this->getAdmin();
         $viewer = $this->getViewer();
-        $page = Page::first();
+        $page = Page::first(); /** @var Page $page */
 
         $this->actingAs($admin);
         $fileName = 'permission_test.txt';
@@ -233,7 +233,7 @@ class AttachmentTest extends TestCase
         $page->restricted = true;
         $page->permissions()->delete();
         $page->save();
-        $this->app[PermissionService::class]->buildJointPermissionsForEntity($page);
+        $page->rebuildPermissions();
         $page->load('jointPermissions');
 
         $this->actingAs($viewer);