mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-03 03:00:14 +00:00
Add some test code.
This commit is contained in:
@@ -64,7 +64,13 @@ class AssetAccountIbansTest extends TestCase
|
||||
$two->name = 'Else';
|
||||
$two->account_type_id = $loan->id;
|
||||
|
||||
$collection = new Collection([$one, $two]);
|
||||
$three = new Account;
|
||||
$three->id = 66;
|
||||
$three->name = 'I have IBAN';
|
||||
$three->iban = 'IBAN';
|
||||
$three->account_type_id = $loan->id;
|
||||
|
||||
$collection = new Collection([$one, $two, $three]);
|
||||
|
||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||
$repository->shouldReceive('getAccountsByType')->withArgs(
|
||||
@@ -73,11 +79,12 @@ class AssetAccountIbansTest extends TestCase
|
||||
|
||||
$mapper = new AssetAccountIbans();
|
||||
$mapping = $mapper->getMap();
|
||||
$this->assertCount(3, $mapping);
|
||||
$this->assertCount(4, $mapping);
|
||||
// assert this is what the result looks like:
|
||||
$result = [
|
||||
0 => (string)trans('import.map_do_not_map'),
|
||||
53 => 'Else (liability)',
|
||||
66 => 'IBAN (I have IBAN) (liability)',
|
||||
17 => 'IBAN (Something)',
|
||||
];
|
||||
$this->assertEquals($result, $mapping);
|
||||
|
Reference in New Issue
Block a user