mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
parent
8ae35f645a
commit
35e6635379
@ -58,7 +58,7 @@
|
|||||||
<h1 id="{{$bookChild->getType()}}-{{$bookChild->id}}">{{ $bookChild->name }}</h1>
|
<h1 id="{{$bookChild->getType()}}-{{$bookChild->id}}">{{ $bookChild->name }}</h1>
|
||||||
|
|
||||||
@if($bookChild->isA('chapter'))
|
@if($bookChild->isA('chapter'))
|
||||||
<p>{{ $bookChild->description }}</p>
|
<p>{{ $bookChild->text }}</p>
|
||||||
|
|
||||||
@if(count($bookChild->pages) > 0)
|
@if(count($bookChild->pages) > 0)
|
||||||
@foreach($bookChild->pages as $page)
|
@foreach($bookChild->pages as $page)
|
||||||
|
@ -76,6 +76,20 @@ class ExportTest extends TestCase
|
|||||||
$resp->assertHeader('Content-Disposition', 'attachment; filename="' . $book->slug . '.html"');
|
$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()
|
public function test_chapter_text_export()
|
||||||
{
|
{
|
||||||
$chapter = Chapter::first();
|
$chapter = Chapter::first();
|
||||||
|
Loading…
Reference in New Issue
Block a user