1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Fixed chapter description not showing in book exports

Closes #1465
This commit is contained in:
Dan Brown
2019-05-25 15:21:02 +01:00
parent 8ae35f645a
commit 35e6635379
2 changed files with 15 additions and 1 deletions

View File

@ -76,6 +76,20 @@ class ExportTest extends TestCase
$resp->assertHeader('Content-Disposition', 'attachment; filename="' . $book->slug . '.html"');
}
public function test_book_html_export_shows_chapter_descriptions()
{
$chapterDesc = 'My custom test chapter description ' . str_random(12);
$chapter = Chapter::query()->first();
$chapter->description = $chapterDesc;
$chapter->save();
$book = $chapter->book;
$this->asEditor();
$resp = $this->get($book->getUrl('/export/html'));
$resp->assertSee($chapterDesc);
}
public function test_chapter_text_export()
{
$chapter = Chapter::first();