delete invoices (#1652)

* include all meta fields as template variables
* support invoice preview via command
* support deletion of generated invoices
This commit is contained in:
Kevin Papst
2020-04-23 12:19:07 +02:00
committed by GitHub
parent cfe0724620
commit 711139ad4c
20 changed files with 206 additions and 36 deletions

View File

@@ -266,7 +266,7 @@ class InvoiceControllerTest extends ControllerBaseTest
$this->assertEquals('invoice_print', $node->getIterator()[0]->getAttribute('class'));
}
public function testCreateActionAsAdminWithDownloadAndStatusChange()
public function testCreateActionAsAdminWithDownloadAndStatusChangeAndDelete()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
/** @var EntityManager $em */
@@ -350,6 +350,11 @@ class InvoiceControllerTest extends ControllerBaseTest
$this->assertIsRedirect($client, '/invoice/show');
$client->followRedirect();
$this->assertTrue($client->getResponse()->isSuccessful());
$this->request($client, '/invoice/delete/1');
$this->assertIsRedirect($client, '/invoice/show');
$client->followRedirect();
$this->assertTrue($client->getResponse()->isSuccessful());
}
public function testEditTemplateAction()