mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Add Markdown export
This commit is contained in:
parent
2560826b41
commit
2a382b15c1
9 changed files with 170 additions and 22 deletions
|
@ -307,6 +307,22 @@ class ExportControllerTest extends WallabagTestCase
|
|||
$this->assertNotEmpty('updated_at', (string) $content->entry[0]->updated_at);
|
||||
}
|
||||
|
||||
public function testMdExport()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getTestClient();
|
||||
$client->request('GET', '/export/all.md');
|
||||
|
||||
$this->assertSame(200, $client->getResponse()->getStatusCode());
|
||||
|
||||
$headers = $client->getResponse()->headers;
|
||||
$content = $client->getResponse()->getContent();
|
||||
$this->assertSame('text/markdown; charset=UTF-8', $headers->get('content-type'));
|
||||
$this->assertSame('attachment; filename="All articles.md"', $headers->get('content-disposition'));
|
||||
$this->assertSame('UTF-8', $headers->get('content-transfer-encoding'));
|
||||
$this->assertStringContainsString('=================', $content);
|
||||
}
|
||||
|
||||
public function testJsonExportFromSameDomain()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue