]> BookStack Code Mirror - bookstack/blobdiff - tests/TestCase.php
Rolled out new permissions system throughout application
[bookstack] / tests / TestCase.php
index f46d73e04e275d51ba2c9f923965fb6fe41b0568..1b6a69c6276515d0e827fbc264591ad622ea15e8 100644 (file)
@@ -65,6 +65,8 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
         $page = factory(BookStack\Page::class)->create(['created_by' => $creatorUser->id, 'updated_by' => $updaterUser->id, 'book_id' => $book->id]);
         $book->chapters()->saveMany([$chapter]);
         $chapter->pages()->saveMany([$page]);
+        $restrictionService = $this->app[\BookStack\Services\RestrictionService::class];
+        $restrictionService->buildEntityPermissionsForEntity($book);
         return [
             'book' => $book,
             'chapter' => $chapter,