]> BookStack Code Mirror - bookstack/blobdiff - tests/Permissions/ExportPermissionsTest.php
Guest create page: name field autofocus
[bookstack] / tests / Permissions / ExportPermissionsTest.php
index 7e9ce6100bfe2dc75c6ec694038f16508397f7d9..642cf1beba14dba92b2b14e456483009066cc45b 100644 (file)
@@ -2,8 +2,6 @@
 
 namespace Tests\Permissions;
 
-use BookStack\Entities\Models\Book;
-use BookStack\Entities\Models\Chapter;
 use Illuminate\Support\Str;
 use Tests\TestCase;
 
@@ -11,7 +9,7 @@ class ExportPermissionsTest extends TestCase
 {
     public function test_page_content_without_view_access_hidden_on_chapter_export()
     {
-        $chapter = Chapter::query()->first();
+        $chapter = $this->entities->chapter();
         $page = $chapter->pages()->firstOrFail();
         $pageContent = Str::random(48);
         $page->html = '<p>' . $pageContent . '</p>';
@@ -39,7 +37,7 @@ class ExportPermissionsTest extends TestCase
 
     public function test_page_content_without_view_access_hidden_on_book_export()
     {
-        $book = Book::query()->first();
+        $book = $this->entities->book();
         $page = $book->pages()->firstOrFail();
         $pageContent = Str::random(48);
         $page->html = '<p>' . $pageContent . '</p>';