1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Quick run through of applying new test entity helper class

This commit is contained in:
Dan Brown
2022-09-29 22:11:16 +01:00
parent b56f7355aa
commit 900e853b15
47 changed files with 198 additions and 286 deletions

View File

@@ -4,7 +4,6 @@ namespace Tests\Api;
use BookStack\Entities\Models\Book;
use BookStack\Entities\Models\Deletion;
use BookStack\Entities\Models\Page;
use Illuminate\Support\Collection;
use Tests\TestCase;
@@ -111,7 +110,7 @@ class RecycleBinApiTest extends TestCase
public function test_index_endpoint_returns_parent()
{
$admin = $this->getAdmin();
$page = Page::query()->whereHas('chapter')->with('chapter')->first();
$page = $this->entities->pageWithinChapter();
$this->actingAs($admin)->delete($page->getUrl());
$deletion = Deletion::query()->orderBy('id')->first();