mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2026-03-03 02:37:02 +00:00
Fixes for tests
This commit is contained in:
@@ -43,6 +43,7 @@ class CreditBalanceTest extends TestCase
|
||||
'company_id' => $this->company->id,
|
||||
'client_id' => $this->client->id,
|
||||
'balance' => 10,
|
||||
'due_date' => null,
|
||||
'number' => 'testing-number-01',
|
||||
'status_id' => Credit::STATUS_SENT,
|
||||
]);
|
||||
@@ -50,6 +51,22 @@ class CreditBalanceTest extends TestCase
|
||||
$this->assertEquals($this->client->service()->getCreditBalance(), 10);
|
||||
}
|
||||
|
||||
public function testCreditBalance2()
|
||||
{
|
||||
$credit = Credit::factory()->create([
|
||||
'user_id' => $this->user->id,
|
||||
'company_id' => $this->company->id,
|
||||
'client_id' => $this->client->id,
|
||||
'balance' => 10,
|
||||
'due_date' => now()->addDays(10),
|
||||
'number' => 'testing-number-01',
|
||||
'status_id' => Credit::STATUS_SENT,
|
||||
]);
|
||||
|
||||
$this->assertEquals($this->client->service()->getCreditBalance(), 10);
|
||||
}
|
||||
|
||||
|
||||
public function testExpiredCreditBalance()
|
||||
{
|
||||
$credit = Credit::factory()->create([
|
||||
@@ -57,7 +74,7 @@ class CreditBalanceTest extends TestCase
|
||||
'company_id' => $this->company->id,
|
||||
'client_id' => $this->client->id,
|
||||
'balance' => 10,
|
||||
'due_date' => now()->addDays(5),
|
||||
'due_date' => now()->subDays(5),
|
||||
'number' => 'testing-number-02',
|
||||
'status_id' => Credit::STATUS_SENT,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user