mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for tests
This commit is contained in:
parent
a6945fea11
commit
fb33fadae3
@ -68,6 +68,8 @@ class InvoicesTest extends TestCase
|
|||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
'client_id' => $client->id,
|
'client_id' => $client->id,
|
||||||
|
'number' => 'testing-number-02',
|
||||||
|
'due_date' => now()->addMonth(),
|
||||||
'status_id' => Invoice::STATUS_SENT,
|
'status_id' => Invoice::STATUS_SENT,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -75,6 +77,7 @@ class InvoicesTest extends TestCase
|
|||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
'client_id' => $client->id,
|
'client_id' => $client->id,
|
||||||
|
'number' => 'testing-number-03',
|
||||||
'status_id' => Invoice::STATUS_PAID,
|
'status_id' => Invoice::STATUS_PAID,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -82,10 +85,16 @@ class InvoicesTest extends TestCase
|
|||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
'client_id' => $client->id,
|
'client_id' => $client->id,
|
||||||
|
'number' => 'testing-number-04',
|
||||||
|
'due_date' => '',
|
||||||
'status_id' => Invoice::STATUS_UNPAID,
|
'status_id' => Invoice::STATUS_UNPAID,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->actingAs($client->contacts->first(), 'contact');
|
$sent->load('client');
|
||||||
|
$paid->load('client');
|
||||||
|
$unpaid->load('client');
|
||||||
|
|
||||||
|
$this->actingAs($client->contacts()->first(), 'contact');
|
||||||
|
|
||||||
Livewire::test(InvoicesTable::class, ['company_id' => $company->id, 'db' => $company->db])
|
Livewire::test(InvoicesTable::class, ['company_id' => $company->id, 'db' => $company->db])
|
||||||
->assertSee($sent->number)
|
->assertSee($sent->number)
|
||||||
@ -97,7 +106,6 @@ class InvoicesTest extends TestCase
|
|||||||
->assertSee($paid->number)
|
->assertSee($paid->number)
|
||||||
->assertDontSee($unpaid->number);
|
->assertDontSee($unpaid->number);
|
||||||
|
|
||||||
|
|
||||||
$user->forceDelete();
|
$user->forceDelete();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user