mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
The net worth chart will respect net worth preferences.
This commit is contained in:
@@ -171,6 +171,11 @@ class StageImportDataHandlerTest extends TestCase
|
||||
$accountFactory->shouldReceive('create')->withArgs([$expectedAccount])
|
||||
->andReturn($deposit)->once();
|
||||
|
||||
// set new last transaction ID:
|
||||
$lastPref = new Preference;
|
||||
$lastPref->data =0;
|
||||
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'bunq-last-transaction-1234', 0])->andReturn($lastPref)->once();
|
||||
|
||||
|
||||
$handler = new StageImportDataHandler;
|
||||
$handler->setImportJob($job);
|
||||
@@ -233,6 +238,11 @@ class StageImportDataHandlerTest extends TestCase
|
||||
$accountRepository->shouldReceive('findNull')->withArgs([5678])->andReturn($account)->once();
|
||||
$payment->shouldReceive('listing')->once()->andReturn($list);
|
||||
|
||||
// set new last transaction ID:
|
||||
$lastPref = new Preference;
|
||||
$lastPref->data =0;
|
||||
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'bunq-last-transaction-1234', 0])->andReturn($lastPref)->once();
|
||||
|
||||
$handler = new StageImportDataHandler;
|
||||
$handler->setImportJob($job);
|
||||
try {
|
||||
@@ -279,6 +289,11 @@ class StageImportDataHandlerTest extends TestCase
|
||||
$amount = new Amount('150', 'EUR');
|
||||
$pointer = new Pointer('iban', 'ES2364265841767173822054', 'Test Site');
|
||||
|
||||
// set new last transaction ID:
|
||||
$lastPref = new Preference;
|
||||
$lastPref->data =0;
|
||||
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'bunq-last-transaction-1234', 0])->andReturn($lastPref)->once();
|
||||
|
||||
|
||||
// ignore the deprecated fields:
|
||||
$amount->setValue('150');
|
||||
@@ -431,6 +446,11 @@ class StageImportDataHandlerTest extends TestCase
|
||||
$value = [$payment];
|
||||
$list = new BunqResponsePaymentList($value, [], null);
|
||||
|
||||
// set new last transaction ID:
|
||||
$lastPref = new Preference;
|
||||
$lastPref->data =0;
|
||||
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'bunq-last-transaction-1234', 0])->andReturn($lastPref)->once();
|
||||
|
||||
$expectedTransactions = [
|
||||
[
|
||||
'user' => 1,
|
||||
|
Reference in New Issue
Block a user