Expand some tests.

This commit is contained in:
James Cole 2018-02-24 09:18:01 +01:00
parent 6fe5b50410
commit ac66e89edb
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
4 changed files with 4 additions and 7 deletions

View File

@ -205,6 +205,7 @@ class ReconcileControllerTest extends TestCase
'transactions' => [1, 2, 3],
'reconcile' => 'create',
'difference' => '5',
'start' => '20170101',
'end' => '20170131',
];
$this->be($this->user());

View File

@ -97,7 +97,7 @@ class AccountControllerTest extends TestCase
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(AccountRepositoryInterface::class);
$repository->shouldReceive('find')->withArgs([0])->once()->andReturn(new Account);
$repository->shouldReceive('findNull')->withArgs([0])->once()->andReturn(null);
$repository->shouldReceive('destroy')->andReturn(true);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
@ -285,7 +285,6 @@ class AccountControllerTest extends TestCase
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(AccountRepositoryInterface::class);
$repository->shouldReceive('find')->andReturn(new Account)->once();
$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
@ -313,7 +312,6 @@ class AccountControllerTest extends TestCase
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(AccountRepositoryInterface::class);
$repository->shouldReceive('find')->andReturn(new Account)->once();
$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
@ -339,7 +337,6 @@ class AccountControllerTest extends TestCase
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(AccountRepositoryInterface::class);
$repository->shouldReceive('find')->andReturn(new Account)->once();
$repository->shouldReceive('update')->once();
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
@ -365,7 +362,6 @@ class AccountControllerTest extends TestCase
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(AccountRepositoryInterface::class);
$repository->shouldReceive('find')->andReturn(new Account)->once();
$repository->shouldReceive('update')->once();
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);

View File

@ -576,7 +576,7 @@ class BudgetControllerTest extends TestCase
$repository->shouldReceive('find')->andReturn($budget);
$repository->shouldReceive('update');
$repository->shouldReceive('cleanupBudgets');
$this->session(['budgets.edit.uri' => 'http://localhost']);
$data = [

View File

@ -203,7 +203,7 @@ class BulkControllerTest extends TestCase
$repository->shouldReceive('updateBudget')->times(4)->andReturn(new TransactionJournal())
->withArgs([Mockery::any(), $data['budget_id']]);
$repository->shouldReceive('updateTags')->times(4)->andReturn(true)
$repository->shouldReceive('updateTags')->times(4)->andReturn(new TransactionJournal())
->withArgs([Mockery::any(), $tags]);