X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..ed6ec341dfc1dff765911b5b283884c56ef747fe:/tests/Entity/BookTest.php diff --git a/tests/Entity/BookTest.php b/tests/Entity/BookTest.php index 6c2cf30d4..74b0b0e0b 100644 --- a/tests/Entity/BookTest.php +++ b/tests/Entity/BookTest.php @@ -31,4 +31,19 @@ class BookTest extends TestCase $redirectReq = $this->get($deleteReq->baseResponse->headers->get('location')); $redirectReq->assertNotificationContains('Book Successfully Deleted'); } + + public function test_next_previous_navigation_controls_show_within_book_content() + { + $book = Book::query()->first(); + $chapter = $book->chapters->first(); + + $resp = $this->asEditor()->get($chapter->getUrl()); + $resp->assertElementContains('#sibling-navigation', 'Next'); + $resp->assertElementContains('#sibling-navigation', $chapter->pages[0]->name); + + $resp = $this->get($chapter->pages[0]->getUrl()); + $resp->assertElementContains('#sibling-navigation', $chapter->pages[1]->name); + $resp->assertElementContains('#sibling-navigation', 'Previous'); + $resp->assertElementContains('#sibling-navigation', $chapter->name); + } } \ No newline at end of file