X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/7fd6d5b2ccca0c4ea9740366da0dc8720dadc8ad..refs/pull/5721/head:/tests/Entity/BookShelfTest.php diff --git a/tests/Entity/BookShelfTest.php b/tests/Entity/BookShelfTest.php index 7f6542d5c..fb9862931 100644 --- a/tests/Entity/BookShelfTest.php +++ b/tests/Entity/BookShelfTest.php @@ -403,4 +403,15 @@ class BookShelfTest extends TestCase $resp = $this->asEditor()->get($shelf->getUrl('/create-book')); $this->withHtml($resp)->assertElementContains('form a[href="' . $shelf->getUrl() . '"]', 'Cancel'); } + + public function test_show_view_displays_description_if_no_description_html_set() + { + $shelf = $this->entities->shelf(); + $shelf->description_html = ''; + $shelf->description = "My great\ndescription\n\nwith newlines"; + $shelf->save(); + + $resp = $this->asEditor()->get($shelf->getUrl()); + $resp->assertSee("

My great
\ndescription
\n
\nwith newlines

", false); + } }