X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/35e6635379d8a4027ddba559a9ff51eb7f83969e..refs/pull/1756/head:/tests/Entity/ExportTest.php diff --git a/tests/Entity/ExportTest.php b/tests/Entity/ExportTest.php index 683f23674..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 { @@ -78,7 +80,7 @@ class ExportTest extends TestCase public function test_book_html_export_shows_chapter_descriptions() { - $chapterDesc = 'My custom test chapter description ' . str_random(12); + $chapterDesc = 'My custom test chapter description ' . Str::random(12); $chapter = Chapter::query()->first(); $chapter->description = $chapterDesc; $chapter->save(); @@ -148,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('