mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Quick run through of applying new test entity helper class
This commit is contained in:
@ -96,8 +96,7 @@ class ChapterTest extends TestCase
|
||||
|
||||
public function test_copy_does_not_copy_non_visible_pages()
|
||||
{
|
||||
/** @var Chapter $chapter */
|
||||
$chapter = Chapter::query()->whereHas('pages')->first();
|
||||
$chapter = $this->entities->chapterHasPages();
|
||||
|
||||
// Hide pages to all non-admin roles
|
||||
/** @var Page $page */
|
||||
@ -118,8 +117,7 @@ class ChapterTest extends TestCase
|
||||
|
||||
public function test_copy_does_not_copy_pages_if_user_cant_page_create()
|
||||
{
|
||||
/** @var Chapter $chapter */
|
||||
$chapter = Chapter::query()->whereHas('pages')->first();
|
||||
$chapter = $this->entities->chapterHasPages();
|
||||
$viewer = $this->getViewer();
|
||||
$this->giveUserPermissions($viewer, ['chapter-create-all']);
|
||||
|
||||
|
Reference in New Issue
Block a user