Fix tests.

This commit is contained in:
James Cole 2018-06-01 05:49:41 +02:00
parent df87d03f32
commit 66fa73aea4

View File

@ -97,9 +97,6 @@ class SplitControllerTest extends TestCase
$journalRepos->shouldReceive('getJournalTotal')->andReturn('0');
$journalRepos->shouldReceive('getJournalCategoryName')->andReturn('Some');
// mock for new account list and for account array
$accountRepos->shouldReceive('getAccountsByType')
->withArgs([[AccountType::ASSET, AccountType::DEFAULT]])->andReturn(new Collection([$account]))->twice();
$currencyRepository->shouldReceive('get')->once()->andReturn(new Collection);
$budgetRepository->shouldReceive('getActiveBudgets')->andReturn(new Collection);
@ -138,10 +135,6 @@ class SplitControllerTest extends TestCase
$currencyRepository->shouldReceive('get')->once()->andReturn(new Collection);
$budgetRepository->shouldReceive('getActiveBudgets')->andReturn(new Collection);
// mock for new account list and for account array
$accountRepos->shouldReceive('getAccountsByType')
->withArgs([[AccountType::ASSET, AccountType::DEFAULT]])->andReturn(new Collection([$account]))->twice();
$journalRepos->shouldReceive('firstNull')->once()->andReturn($deposit);
$journalRepos->shouldReceive('getJournalSourceAccounts')->andReturn(new Collection([$account]));
@ -270,9 +263,6 @@ class SplitControllerTest extends TestCase
$currencyRepository->shouldReceive('get')->once()->andReturn(new Collection);
$budgetRepository->shouldReceive('getActiveBudgets')->andReturn(new Collection);
// mock for new account list and for account array
$accountRepository->shouldReceive('getAccountsByType')
->withArgs([[AccountType::ASSET, AccountType::DEFAULT]])->andReturn(new Collection([$account]))->twice();
$this->be($this->user());
$response = $this->get(route('transactions.split.edit', [$deposit->id]));