Fix tests for new transaction source routine.

This commit is contained in:
James Cole 2018-09-06 07:37:44 +02:00
parent b1cc17d96e
commit 7bca2298a0
3 changed files with 14 additions and 5 deletions

View File

@ -189,7 +189,7 @@ class StageImportDataHandler
'piggy_bank_name' => null,
'bill_id' => null,
'bill_name' => null,
'original-source' => sprintf('spectre-v%s', config('firefly.version')),
'original-source' => sprintf('spectre-v%s', config('firefly.version')),
// transaction data:
'transactions' => [

View File

@ -41,10 +41,10 @@ use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
use FireflyIII\Services\Bunq\ApiContext;
use FireflyIII\Services\Bunq\Payment;
use FireflyIII\Support\Import\Routine\Bunq\StageImportDataHandler;
use Log;
use Mockery;
use Preferences;
use Tests\TestCase;
use Log;
/**
* Class StageImportDataHandlerTest
@ -158,6 +158,7 @@ class StageImportDataHandlerTest extends TestCase
'identifier' => 0,
],
],
'original-source' => 'bunq-v' . config('firefly.version'),
],
];
@ -382,6 +383,7 @@ class StageImportDataHandlerTest extends TestCase
'identifier' => 0,
],
],
'original-source' => 'bunq-v' . config('firefly.version'),
],
];

View File

@ -34,9 +34,9 @@ use FireflyIII\Services\Spectre\Object\Transaction as SpectreTransaction;
use FireflyIII\Services\Spectre\Request\ListTransactionsRequest;
use FireflyIII\Support\Import\Routine\File\OpposingAccountMapper;
use FireflyIII\Support\Import\Routine\Spectre\StageImportDataHandler;
use Log;
use Mockery;
use Tests\TestCase;
use Log;
/**
* Class StageImportDataHandlerTest
@ -51,6 +51,7 @@ class StageImportDataHandlerTest extends TestCase
parent::setUp();
Log::info(sprintf('Now in %s.', \get_class($this)));
}
/**
* @covers \FireflyIII\Support\Import\Routine\Spectre\StageImportDataHandler
*/
@ -156,7 +157,7 @@ class StageImportDataHandlerTest extends TestCase
'piggy_bank_name' => null,
'bill_id' => null,
'bill_name' => null,
'original-source' => sprintf('spectre-v%s', config('firefly.version')),
// transaction data:
'transactions' => [
[
@ -179,6 +180,7 @@ class StageImportDataHandlerTest extends TestCase
'identifier' => 0,
],
],
],
1 => [
'type' => 'deposit',
@ -193,7 +195,7 @@ class StageImportDataHandlerTest extends TestCase
'piggy_bank_name' => null,
'bill_id' => null,
'bill_name' => null,
'original-source' => sprintf('spectre-v%s', config('firefly.version')),
// transaction data:
'transactions' => [
[
@ -216,6 +218,7 @@ class StageImportDataHandlerTest extends TestCase
'identifier' => 0,
],
],
],
];
$accountRepos->shouldReceive('setUser')->once();
@ -357,6 +360,7 @@ class StageImportDataHandlerTest extends TestCase
'piggy_bank_name' => null,
'bill_id' => null,
'bill_name' => null,
'original-source' => sprintf('spectre-v%s', config('firefly.version')),
// transaction data:
'transactions' => [
@ -394,6 +398,7 @@ class StageImportDataHandlerTest extends TestCase
'piggy_bank_name' => null,
'bill_id' => null,
'bill_name' => null,
'original-source' => sprintf('spectre-v%s', config('firefly.version')),
// transaction data:
'transactions' => [
@ -553,6 +558,7 @@ class StageImportDataHandlerTest extends TestCase
'piggy_bank_name' => null,
'bill_id' => null,
'bill_name' => null,
'original-source' => sprintf('spectre-v%s', config('firefly.version')),
// transaction data:
'transactions' => [
@ -590,6 +596,7 @@ class StageImportDataHandlerTest extends TestCase
'piggy_bank_name' => null,
'bill_id' => null,
'bill_name' => null,
'original-source' => sprintf('spectre-v%s', config('firefly.version')),
// transaction data:
'transactions' => [