1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Input WYSIWYG: Aligned newline handling with old descriptions

To ensure consistenent behaviour before/after changes.
Added tests to cover.
This commit is contained in:
Dan Brown
2023-12-20 17:40:58 +00:00
parent a21ca44633
commit ed5d67e609
7 changed files with 37 additions and 4 deletions

View File

@@ -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("<p>My great<br>\ndescription<br>\n<br>\nwith newlines</p>", false);
}
public function test_delete()
{
$chapter = Chapter::query()->whereHas('pages')->first();