mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Improve test coverage.
This commit is contained in:
@@ -509,6 +509,7 @@ class CurrencyControllerTest extends TestCase
|
||||
|
||||
$repository->shouldReceive('update')->andReturn(new TransactionCurrency);
|
||||
$userRepos->shouldReceive('hasRole')->once()->andReturn(true);
|
||||
$repository->shouldReceive('currencyInUse')->atLeast()->once()->andReturn(true);
|
||||
Preferences::shouldReceive('mark')->atLeast()->once();
|
||||
|
||||
$this->session(['currencies.edit.uri' => 'http://localhost']);
|
||||
|
@@ -55,9 +55,9 @@ class ShowControllerTest extends TestCase
|
||||
$withdrawal = $this->getRandomWithdrawalGroup();
|
||||
$array = $this->getRandomWithdrawalGroupAsArray();
|
||||
|
||||
$array[0]['transactions'][0]['foreign_amount'] = '10';
|
||||
$array[0]['transactions'][0]['foreign_currency_symbol'] = 'x';
|
||||
$array[0]['transactions'][0]['foreign_currency_decimal_places'] = 2;
|
||||
$array['transactions'][0]['foreign_amount'] = '10';
|
||||
$array['transactions'][0]['foreign_currency_symbol'] = 'x';
|
||||
$array['transactions'][0]['foreign_currency_decimal_places'] = 2;
|
||||
|
||||
$groupRepository = $this->mock(TransactionGroupRepositoryInterface::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
@@ -65,7 +65,7 @@ class ShowControllerTest extends TestCase
|
||||
|
||||
// mock for transformer:
|
||||
$transformer->shouldReceive('setParameters')->atLeast()->once();
|
||||
$transformer->shouldReceive('transformObject')->atLeast()->once()->andReturn($array[0]);
|
||||
$transformer->shouldReceive('transformObject')->atLeast()->once()->andReturn($array);
|
||||
|
||||
// mock for repos
|
||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
|
||||
|
Reference in New Issue
Block a user