X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/82c6597a603f34ed14c2962d195795e64f1c75b8..refs/pull/3008/head:/tests/Entity/BookShelfTest.php diff --git a/tests/Entity/BookShelfTest.php b/tests/Entity/BookShelfTest.php index 480d29002..1780ddee8 100644 --- a/tests/Entity/BookShelfTest.php +++ b/tests/Entity/BookShelfTest.php @@ -369,4 +369,12 @@ class BookShelfTest extends TestCase $resp = $this->asEditor()->get($newBook->getUrl()); $resp->assertDontSee($shelfInfo['name']); } + + public function test_cancel_on_child_book_creation_returns_to_original_shelf() + { + /** @var Bookshelf $shelf */ + $shelf = Bookshelf::query()->first(); + $resp = $this->asEditor()->get($shelf->getUrl('/create-book')); + $resp->assertElementContains('form a[href="' . $shelf->getUrl() . '"]', 'Cancel'); + } }