add subtotal and payment date to invoices (#2450)
This commit is contained in:
@@ -320,6 +320,29 @@ class InvoiceControllerTest extends ControllerBaseTest
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
$this->request($client, '/invoice/change-status/' . $id . '/paid');
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
$this->assertHasValidationError(
|
||||
$client,
|
||||
'/invoice/change-status/' . $id . '/paid',
|
||||
'form[name=invoice_payment_date_form]',
|
||||
[
|
||||
'invoice_payment_date_form' => [
|
||||
'paymentDate' => 'invalid'
|
||||
]
|
||||
],
|
||||
['#invoice_payment_date_form_paymentDate']
|
||||
);
|
||||
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
$form = $client->getCrawler()->filter('form[name=invoice_payment_date_form]')->form();
|
||||
$client->submit($form, [
|
||||
'invoice_payment_date_form' => [
|
||||
'paymentDate' => (new \DateTime())->format('Y-m-d')
|
||||
]
|
||||
]);
|
||||
|
||||
$this->assertIsRedirect($client, '/invoice/show');
|
||||
$client->followRedirect();
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
Reference in New Issue
Block a user