Fixes for tests

This commit is contained in:
David Bomba 2023-01-02 17:55:57 +11:00
parent b01bf53fca
commit d97f17ea39
5 changed files with 21 additions and 21 deletions

View File

@ -1 +1 @@
5.5.49
5.5.50

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.5.49',
'app_tag' => '5.5.49',
'app_version' => '5.5.50',
'app_tag' => '5.5.50',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),

View File

@ -86,12 +86,12 @@ class InvoicesTest extends TestCase
$this->actingAs($client->contacts->first(), 'contact');
Livewire::test(InvoicesTable::class, ['company_id' => $company->id, 'db' => $db])
Livewire::test(InvoicesTable::class, ['company_id' => $company->id, 'db' => $company->db])
->assertSee($sent->number)
->assertSee($paid->number)
->assertSee($unpaid->number);
Livewire::test(InvoicesTable::class, ['company_id' => $company->id, 'db' => $db])
Livewire::test(InvoicesTable::class, ['company_id' => $company->id, 'db' => $company->db])
->set('status', ['paid'])
->assertSee($paid->number)
->assertDontSee($unpaid->number);

View File

@ -144,7 +144,7 @@ class ProfitAndLossReportTest extends TestCase
'balance' => 11,
'status_id' => 2,
'total_taxes' => 1,
'date' => '2022-01-01',
'date' => now()->format('Y-m-d'),
'terms' => 'nada',
'discount' => 0,
'tax_rate1' => 0,
@ -183,7 +183,7 @@ class ProfitAndLossReportTest extends TestCase
'balance' => 10,
'status_id' => 2,
'total_taxes' => 1,
'date' => '2022-01-01',
'date' => now()->format('Y-m-d'),
'terms' => 'nada',
'discount' => 0,
'tax_rate1' => 10,
@ -226,7 +226,7 @@ class ProfitAndLossReportTest extends TestCase
'balance' => 10,
'status_id' => 2,
'total_taxes' => 1,
'date' => '2022-01-01',
'date' => now()->format('Y-m-d'),
'terms' => 'nada',
'discount' => 0,
'tax_rate1' => 10,
@ -282,7 +282,7 @@ class ProfitAndLossReportTest extends TestCase
'balance' => 10,
'status_id' => 2,
'total_taxes' => 0,
'date' => '2022-01-01',
'date' => now()->format('Y-m-d'),
'terms' => 'nada',
'discount' => 0,
'tax_rate1' => 0,
@ -313,7 +313,7 @@ class ProfitAndLossReportTest extends TestCase
'amount' => 10,
'company_id' => $this->company->id,
'user_id' => $this->user->id,
'date' => '2022-01-01',
'date' => now()->format('Y-m-d'),
]);
$pl = new ProfitLoss($this->company, $this->payload);
@ -334,7 +334,7 @@ class ProfitAndLossReportTest extends TestCase
$e = ExpenseFactory::create($this->company->id, $this->user->id);
$e->amount = 10;
$e->date = '2022-01-01';
$e->date = now()->format('Y-m-d');
$e->calculate_tax_by_amount = true;
$e->tax_amount1 = 10;
$e->save();
@ -358,7 +358,7 @@ class ProfitAndLossReportTest extends TestCase
$e = ExpenseFactory::create($this->company->id, $this->user->id);
$e->amount = 10;
$e->date = '2022-01-01';
$e->date = now()->format('Y-m-d');
$e->tax_rate1 = 10;
$e->tax_name1 = 'GST';
$e->uses_inclusive_taxes = false;
@ -383,7 +383,7 @@ class ProfitAndLossReportTest extends TestCase
$e = ExpenseFactory::create($this->company->id, $this->user->id);
$e->amount = 10;
$e->date = '2022-01-01';
$e->date = now()->format('Y-m-d');
$e->tax_rate1 = 10;
$e->tax_name1 = 'GST';
$e->uses_inclusive_taxes = false;
@ -410,7 +410,7 @@ class ProfitAndLossReportTest extends TestCase
'amount' => 10,
'company_id' => $this->company->id,
'user_id' => $this->user->id,
'date' => '2022-01-01',
'date' => now()->format('Y-m-d'),
'exchange_rate' => 1,
'currency_id' => $this->company->settings->currency_id,
]);
@ -440,7 +440,7 @@ class ProfitAndLossReportTest extends TestCase
'amount' => 10,
'company_id' => $this->company->id,
'user_id' => $this->user->id,
'date' => '2022-01-01',
'date' => now()->format('Y-m-d'),
'exchange_rate' => 1,
'currency_id' => $this->company->settings->currency_id,
]);
@ -454,7 +454,7 @@ class ProfitAndLossReportTest extends TestCase
'amount' => 10,
'company_id' => $this->company->id,
'user_id' => $this->user->id,
'date' => '2022-01-01',
'date' => now()->format('Y-m-d'),
'exchange_rate' => 1,
'currency_id' => $this->company->settings->currency_id,
]);
@ -489,7 +489,7 @@ class ProfitAndLossReportTest extends TestCase
'balance' => 10,
'status_id' => 2,
'total_taxes' => 1,
'date' => '2022-01-01',
'date' => now()->format('Y-m-d'),
'terms' => 'nada',
'discount' => 0,
'tax_rate1' => 10,
@ -510,7 +510,7 @@ class ProfitAndLossReportTest extends TestCase
'amount' => 10,
'company_id' => $this->company->id,
'user_id' => $this->user->id,
'date' => '2022-01-01',
'date' => now()->format('Y-m-d'),
'exchange_rate' => 1,
'currency_id' => $this->company->settings->currency_id,
]);
@ -524,7 +524,7 @@ class ProfitAndLossReportTest extends TestCase
'amount' => 10,
'company_id' => $this->company->id,
'user_id' => $this->user->id,
'date' => '2022-01-01',
'date' => now()->format('Y-m-d'),
'exchange_rate' => 1,
'currency_id' => $this->company->settings->currency_id,
]);

View File

@ -115,8 +115,8 @@ class GeneratesConvertedQuoteCounterTest extends TestCase
$this->assertNotNull($invoice);
$this->assertEquals('2022-Q0001', $quote->number);
$this->assertEquals('2022-I0001', $invoice->number);
$this->assertEquals(now()->format('Y'). '-Q0001', $quote->number);
$this->assertEquals(now()->format('Y'). '-I0001', $invoice->number);
$settings = $this->client->getMergedSettings();
$settings->invoice_number_counter = 100;