1
0
Fork 0
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:
Nicolas Lœuillet 2024-11-12 15:21:23 +01:00
parent 2560826b41
commit 2a382b15c1
9 changed files with 170 additions and 22 deletions

View file

@ -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');