X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/7fd6d5b2ccca0c4ea9740366da0dc8720dadc8ad..refs/pull/5689/head:/tests/Entity/ChapterTest.php diff --git a/tests/Entity/ChapterTest.php b/tests/Entity/ChapterTest.php index a057d91b5..1577cee76 100644 --- a/tests/Entity/ChapterTest.php +++ b/tests/Entity/ChapterTest.php @@ -31,6 +31,17 @@ class ChapterTest extends TestCase $resp->assertSee($chapter->description_html, false); } + public function test_show_view_displays_description_if_no_description_html_set() + { + $chapter = $this->entities->chapter(); + $chapter->description_html = ''; + $chapter->description = "My great\ndescription\n\nwith newlines"; + $chapter->save(); + + $resp = $this->asEditor()->get($chapter->getUrl()); + $resp->assertSee("

My great
\ndescription
\n
\nwith newlines

", false); + } + public function test_delete() { $chapter = Chapter::query()->whereHas('pages')->first();