use token in invoice delete route (#2889)

This commit is contained in:
Kevin Papst
2021-10-30 15:17:06 +02:00
committed by GitHub
parent 40061e43bb
commit 1d32e4ecee
5 changed files with 19 additions and 8 deletions

View File

@@ -353,7 +353,8 @@ class InvoiceControllerTest extends ControllerBaseTest
$client->followRedirect();
$this->assertTrue($client->getResponse()->isSuccessful());
$this->request($client, '/invoice/delete/' . $id);
// this does not delete the invoice, because the token is wrong
$this->request($client, '/invoice/delete/' . $id . '/fghfkjhgkjhg');
$this->assertIsRedirect($client, '/invoice/show');
$client->followRedirect();
$this->assertTrue($client->getResponse()->isSuccessful());