improve export filename (#2958)

This commit is contained in:
Kevin Papst
2021-11-19 18:53:43 +01:00
committed by GitHub
parent 56d02673ed
commit 859131308a
10 changed files with 199 additions and 10 deletions

View File

@@ -58,8 +58,9 @@ class PdfRendererTest extends AbstractRendererTest
$response = $this->render($sut);
$prefix = date('Ymd');
$this->assertEquals('application/pdf', $response->headers->get('Content-Type'));
$this->assertEquals('attachment; filename=kimai-export.pdf', $response->headers->get('Content-Disposition'));
$this->assertEquals('attachment; filename=' . $prefix . '-Customer_Name-project_name.pdf', $response->headers->get('Content-Disposition'));
$this->assertNotEmpty($response->getContent());
}