mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
@ -3,6 +3,7 @@
|
||||
|
||||
use BookStack\Entities\Chapter;
|
||||
use BookStack\Entities\Page;
|
||||
use BookStack\Uploads\HttpFetcher;
|
||||
|
||||
class ExportTest extends TestCase
|
||||
{
|
||||
@ -148,4 +149,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 = '<img src="http://example.com/image.svg">';
|
||||
$page->save();
|
||||
|
||||
$this->asEditor();
|
||||
$this->mockHttpFetch('<svg></svg>');
|
||||
$resp = $this->get($page->getUrl('/export/html'));
|
||||
$resp->assertStatus(200);
|
||||
$resp->assertSee('<img src="data:image/svg+xml;base64');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user