mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-02-01 04:31:37 +01:00
parent
8ae35f645a
commit
35e6635379
@ -58,7 +58,7 @@
|
||||
<h1 id="{{$bookChild->getType()}}-{{$bookChild->id}}">{{ $bookChild->name }}</h1>
|
||||
|
||||
@if($bookChild->isA('chapter'))
|
||||
<p>{{ $bookChild->description }}</p>
|
||||
<p>{{ $bookChild->text }}</p>
|
||||
|
||||
@if(count($bookChild->pages) > 0)
|
||||
@foreach($bookChild->pages as $page)
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user