mirror of
https://github.com/crater-invoice/crater.git
synced 2025-12-15 18:02:55 -05:00
Add File based templates
This commit is contained in:
committed by
Mohit Panjwani
parent
00961bcae1
commit
d1dd704cdf
@@ -51,7 +51,7 @@ test('create estimate', function () {
|
||||
->assertStatus(200);
|
||||
|
||||
$this->assertDatabaseHas('estimates', [
|
||||
'estimate_template_id' => $estimate['estimate_template_id'],
|
||||
'template_name' => $estimate['template_name'],
|
||||
'estimate_number' => $estimate['estimate_number'],
|
||||
'discount_type' => $estimate['discount_type'],
|
||||
'discount_val' => $estimate['discount_val'],
|
||||
@@ -97,7 +97,7 @@ test('update estimate', function () {
|
||||
$newEstimate = $response->decodeResponseJson()['estimate'];
|
||||
|
||||
$this->assertDatabaseHas('estimates', [
|
||||
'estimate_template_id' => $estimate2['estimate_template_id'],
|
||||
'template_name' => $estimate2['template_name'],
|
||||
'estimate_number' => $estimate2['estimate_number'],
|
||||
'discount_type' => $estimate2['discount_type'],
|
||||
'discount_val' => $estimate2['discount_val'],
|
||||
|
||||
@@ -46,7 +46,7 @@ test('create invoice', function () {
|
||||
$response->assertOk();
|
||||
|
||||
$this->assertDatabaseHas('invoices', [
|
||||
'invoice_template_id' => $invoice['invoice_template_id'],
|
||||
'template_name' => $invoice['template_name'],
|
||||
'invoice_number' => $invoice['invoice_number'],
|
||||
'sub_total' => $invoice['sub_total'],
|
||||
'discount' => $invoice['discount'],
|
||||
@@ -78,7 +78,7 @@ test('create invoice as sent', function () {
|
||||
'tax' => $invoice['tax'],
|
||||
'discount' => $invoice['discount'],
|
||||
'user_id' => $invoice['user_id'],
|
||||
'invoice_template_id' => $invoice['invoice_template_id'],
|
||||
'template_name' => $invoice['template_name'],
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('invoice_items', $invoice['items'][0]);
|
||||
@@ -115,7 +115,7 @@ test('update invoice', function () {
|
||||
'tax' => $invoice2['tax'],
|
||||
'discount' => $invoice2['discount'],
|
||||
'user_id' => $invoice2['user_id'],
|
||||
'invoice_template_id' => $invoice2['invoice_template_id'],
|
||||
'template_name' => $invoice2['template_name'],
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('invoice_items', $invoice2['items'][0]);
|
||||
|
||||
Reference in New Issue
Block a user