X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/3298374113ca01401a91caeb71e2b62b6ad7c5ad..refs/pull/5663/head:/tests/Exports/MarkdownExportTest.php diff --git a/tests/Exports/MarkdownExportTest.php b/tests/Exports/MarkdownExportTest.php index 05ebbc68d..3bccd4682 100644 --- a/tests/Exports/MarkdownExportTest.php +++ b/tests/Exports/MarkdownExportTest.php @@ -45,23 +45,35 @@ class MarkdownExportTest extends TestCase public function test_chapter_markdown_export() { $chapter = $this->entities->chapter(); + $chapter->description_html = '
My chapter description
'; + $chapter->save(); $page = $chapter->pages()->first(); + $resp = $this->asEditor()->get($chapter->getUrl('/export/markdown')); $resp->assertSee('# ' . $chapter->name); $resp->assertSee('# ' . $page->name); + $resp->assertSee('My **chapter** description'); } public function test_book_markdown_export() { $book = Book::query()->whereHas('pages')->whereHas('chapters')->first(); + $book->description_html = 'My book description
'; + $book->save(); + $chapter = $book->chapters()->first(); + $chapter->description_html = 'My chapter description
'; + $chapter->save(); + $page = $chapter->pages()->first(); $resp = $this->asEditor()->get($book->getUrl('/export/markdown')); $resp->assertSee('# ' . $book->name); $resp->assertSee('# ' . $chapter->name); $resp->assertSee('# ' . $page->name); + $resp->assertSee('My **book** description'); + $resp->assertSee('My **chapter** description'); } public function test_book_markdown_export_concats_immediate_pages_with_newlines()