Export invoice metafields (#3366)

This commit is contained in:
Kevin Papst
2022-06-21 14:06:23 +02:00
committed by GitHub
parent 452cc46d67
commit e431a1ad9e
4 changed files with 24 additions and 8 deletions

View File

@@ -443,4 +443,16 @@ class InvoiceControllerTest extends ControllerBaseTest
self::assertEquals(1, $node->count(), 'Could not find upload form');
// we do not test the upload here, just make sure that the action can be rendered properly
}
public function testExportIsSecureForRole()
{
$this->assertUrlIsSecuredForRole(User::ROLE_USER, '/invoice/export');
}
public function testExportAction()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD);
$this->assertAccessIsGranted($client, '/invoice/export');
$this->assertExcelExportResponse($client, 'kimai-invoices_');
}
}