mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for Yodlee tests
This commit is contained in:
parent
17d90c0291
commit
2bf1435750
@ -37,7 +37,9 @@ class BankTransactionTest extends TestCase
|
||||
|
||||
public function testMatchBankTransactionsValidationShouldFail()
|
||||
{
|
||||
$data = [
|
||||
$data = [];
|
||||
|
||||
$data['transactions'][] = [
|
||||
'bad_key' => 10,
|
||||
];
|
||||
|
||||
@ -52,13 +54,12 @@ class BankTransactionTest extends TestCase
|
||||
|
||||
public function testMatchBankTransactionValidationShouldPass()
|
||||
{
|
||||
$data = [
|
||||
$data = [];
|
||||
|
||||
$data['transactions'][] = [
|
||||
'id' => $this->bank_transaction->hashed_id,
|
||||
];
|
||||
|
||||
nlog($this->bank_transaction->hashed_id);
|
||||
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
|
@ -58,16 +58,18 @@ class YodleeApiTest extends TestCase
|
||||
$bt->date = now()->format('Y-m-d');
|
||||
$bt->transaction_id = 1234567890;
|
||||
$bt->category_id = 10000003;
|
||||
$bt->base_type = 'DEBIT';
|
||||
$bt->save();
|
||||
|
||||
|
||||
$data = [
|
||||
$data = [];
|
||||
|
||||
$data['transactions'][] = [
|
||||
'id' => $bt->id,
|
||||
];
|
||||
|
||||
MatchBankTransactions::dispatchSync($this->company->id, $this->company->db, $data);
|
||||
|
||||
$expense = Expense::where('public_notes', 'Fuel')->first();
|
||||
$expense = Expense::where('transaction_reference', 'Fuel')->first();
|
||||
|
||||
$this->assertNotNull($expense);
|
||||
$this->assertEquals(10, (int)$expense->amount);
|
||||
@ -116,7 +118,7 @@ class YodleeApiTest extends TestCase
|
||||
$bt->transaction_id = 123456;
|
||||
$bt->save();
|
||||
|
||||
$data = [
|
||||
$data['transactions'][] = [
|
||||
'id' => $bt->id,
|
||||
'invoice_ids' => $invoice->hashed_id
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user