Updated page delete to return to chapter if within one

- Added test to cover

Closes #1715
This commit is contained in:
Dan Brown
2019-12-16 11:54:53 +00:00
parent f122bebae7
commit 017703ff1a
2 changed files with 12 additions and 1 deletions

View File

@ -315,4 +315,14 @@ class EntityTest extends BrowserKitTest
->seePageIs($book->getUrl());
}
public function test_page_within_chapter_deletion_returns_to_chapter()
{
$chapter = Chapter::query()->first();
$page = $chapter->pages()->first();
$this->asEditor()->visit($page->getUrl('/delete'))
->submitForm('Confirm')
->seePageIs($chapter->getUrl());
}
}