1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fixes for tests

This commit is contained in:
David Bomba 2022-10-19 09:54:35 +11:00
parent c1ac1647f6
commit 1f0a6725f7
2 changed files with 4 additions and 3 deletions

View File

@ -166,11 +166,12 @@ class RecurringInvoiceTest extends TestCase
'company_id' => $this->company->id,
]);
});
$client = Client::all()->first();
$client = Client::query()->orderBy('id', 'DESC')->first();
RecurringInvoice::factory()->create(['user_id' => $this->user->id, 'company_id' => $this->company->id, 'client_id' => $this->client->id]);
$RecurringInvoice = RecurringInvoice::where('user_id', $this->user->id)->first();
$RecurringInvoice = RecurringInvoice::query()->where('user_id', $this->user->id)->orderBy('id', 'DESC')->first();
$RecurringInvoice->save();
$response = $this->withHeaders([

View File

@ -63,7 +63,7 @@ class RecurringQuoteTest extends TestCase
{
RecurringQuote::factory()->create(['user_id' => $this->user->id, 'company_id' => $this->company->id, 'client_id' => $this->client->id]);
$RecurringQuote = RecurringQuote::where('user_id', $this->user->id)->first();
$RecurringQuote = RecurringQuote::query()->where('user_id', $this->user->id)->orderBy('id','DESC')->first();
$RecurringQuote->save();
$response = $this->withHeaders([