mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 06:24:35 -04:00
Fixes for tests
This commit is contained in:
parent
335ad0c59f
commit
9ee545160c
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
namespace Tests\Feature;
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use App\Models\BankIntegration;
|
||||||
|
use App\Models\BankTransaction;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
use App\Models\Expense;
|
use App\Models\Expense;
|
||||||
use Tests\MockAccountData;
|
use Tests\MockAccountData;
|
||||||
@ -44,10 +46,22 @@ class ExpenseApiTest extends TestCase
|
|||||||
|
|
||||||
public function testTransactionIdClearedOnDelete()
|
public function testTransactionIdClearedOnDelete()
|
||||||
{
|
{
|
||||||
|
$bi = BankIntegration::factory()->create([
|
||||||
|
'company_id' => $this->company->id,
|
||||||
|
'user_id' => $this->user->id,
|
||||||
|
'account_id' => $this->account->id
|
||||||
|
]);
|
||||||
|
|
||||||
|
$bt = BankTransaction::factory()->create([
|
||||||
|
'company_id' => $this->company->id,
|
||||||
|
'user_id' => $this->user->id,
|
||||||
|
'bank_integration_id' => $bi->id,
|
||||||
|
]);
|
||||||
|
|
||||||
$e = Expense::factory()->create([
|
$e = Expense::factory()->create([
|
||||||
'company_id' => $this->company->id,
|
'company_id' => $this->company->id,
|
||||||
'user_id' => $this->user->id,
|
'user_id' => $this->user->id,
|
||||||
'transaction_id' => '123',
|
'transaction_id' => $bt->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertNotNull($e->transaction_id);
|
$this->assertNotNull($e->transaction_id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user