Route fixes and fix tests.

This commit is contained in:
James Cole
2018-08-09 19:44:36 +02:00
parent 2ed433c96d
commit 5908b4b000
15 changed files with 19 additions and 37 deletions

View File

@@ -229,6 +229,7 @@ class SingleControllerTest extends TestCase
$attRepos = $this->mock(AttachmentHelperInterface::class);
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('setUser')->once();
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
$account = $this->user()->accounts()->first();
@@ -272,6 +273,7 @@ class SingleControllerTest extends TestCase
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
$journalRepos->shouldReceive('setUser')->once();
$budgetRepos->shouldReceive('getBudgets')->andReturn(new Collection)->once();
@@ -318,6 +320,7 @@ class SingleControllerTest extends TestCase
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
$journalRepos->shouldReceive('setUser')->once();
$budgetRepos->shouldReceive('getBudgets')->andReturn(new Collection)->once();
@@ -390,6 +393,7 @@ class SingleControllerTest extends TestCase
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
$journalRepos->shouldReceive('setUser')->once();
$this->be($this->user());
$withdrawal = TransactionJournal::where('transaction_type_id', 1)
@@ -439,6 +443,7 @@ class SingleControllerTest extends TestCase
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
$journalRepos->shouldReceive('setUser')->once();
$budgetRepos->shouldReceive('getBudgets')->andReturn(new Collection)->once();
@@ -487,6 +492,7 @@ class SingleControllerTest extends TestCase
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
$journalRepos->shouldReceive('setUser')->once();
$account = $this->user()->accounts()->first();
$budgetRepos->shouldReceive('getBudgets')->andReturn(new Collection)->once();
@@ -528,6 +534,7 @@ class SingleControllerTest extends TestCase
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
$journalRepos->shouldReceive('setUser')->once();
$budgetRepos->shouldReceive('getBudgets')->andReturn(new Collection)->once();