X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/d673bf61c221ca1aa1b72d636ee354e8ac933fd2..refs/pull/1756/head:/tests/Entity/ExportTest.php
diff --git a/tests/Entity/ExportTest.php b/tests/Entity/ExportTest.php
index fdcd83366..9a2d32028 100644
--- a/tests/Entity/ExportTest.php
+++ b/tests/Entity/ExportTest.php
@@ -3,6 +3,8 @@
use BookStack\Entities\Chapter;
use BookStack\Entities\Page;
+use BookStack\Uploads\HttpFetcher;
+use Illuminate\Support\Str;
class ExportTest extends TestCase
{
@@ -76,6 +78,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();
@@ -134,4 +150,17 @@ class ExportTest extends TestCase
$resp->assertDontSee($page->updated_at->diffForHumans());
}
+ public function test_page_export_sets_right_data_type_for_svg_embeds()
+ {
+ $page = Page::first();
+ $page->html = '
';
+ $page->save();
+
+ $this->asEditor();
+ $this->mockHttpFetch('');
+ $resp = $this->get($page->getUrl('/export/html'));
+ $resp->assertStatus(200);
+ $resp->assertSee(';
+ }
+
}
\ No newline at end of file
)