mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-03 20:20:37 -06:00
Expand some tests.
This commit is contained in:
parent
6fe5b50410
commit
ac66e89edb
@ -205,6 +205,7 @@ class ReconcileControllerTest extends TestCase
|
||||
'transactions' => [1, 2, 3],
|
||||
'reconcile' => 'create',
|
||||
'difference' => '5',
|
||||
'start' => '20170101',
|
||||
'end' => '20170131',
|
||||
];
|
||||
$this->be($this->user());
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 = [
|
||||
|
@ -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]);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user