]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/BookShelfTest.php
Minor capitalisation fix for Estonian
[bookstack] / tests / Entity / BookShelfTest.php
index 480d290028153ef1f7e789924f76da2da604dc7f..1780ddee819504ebbd94bae50163653934a0198e 100644 (file)
@@ -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');
+    }
 }