]> BookStack Code Mirror - bookstack/blobdiff - tests/PublicActionTest.php
Added method for using enity ownership in relation queries
[bookstack] / tests / PublicActionTest.php
index 7e3f7be0032fae9b8ab5030adc6175b46be8aad5..afc7fcef36aafb4e2fd6fd0c92c8aee9c4102e69 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace Tests;
 
-use BookStack\Auth\Permissions\JointPermissionBuilder;
 use BookStack\Auth\Permissions\RolePermission;
 use BookStack\Auth\Role;
 use BookStack\Auth\User;
@@ -89,7 +88,6 @@ class PublicActionTest extends TestCase
         foreach (RolePermission::all() as $perm) {
             $publicRole->attachPermission($perm);
         }
-        $this->app->make(JointPermissionBuilder::class)->rebuildForRole($publicRole);
         user()->clearPermissionCache();
 
         $chapter = $this->entities->chapter();
@@ -173,7 +171,7 @@ class PublicActionTest extends TestCase
     {
         $this->setSettings(['app-public' => 'true']);
         $book = $this->entities->book();
-        $this->entities->setPermissions($book);
+        $this->permissions->setEntityPermissions($book);
 
         $resp = $this->get($book->getUrl());
         $resp->assertSee('Book not found');