mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 18:02:34 +00:00
Expand some tests.
This commit is contained in:
@@ -205,6 +205,7 @@ class ReconcileControllerTest extends TestCase
|
|||||||
'transactions' => [1, 2, 3],
|
'transactions' => [1, 2, 3],
|
||||||
'reconcile' => 'create',
|
'reconcile' => 'create',
|
||||||
'difference' => '5',
|
'difference' => '5',
|
||||||
|
'start' => '20170101',
|
||||||
'end' => '20170131',
|
'end' => '20170131',
|
||||||
];
|
];
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class AccountControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AccountRepositoryInterface::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);
|
$repository->shouldReceive('destroy')->andReturn(true);
|
||||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
@@ -285,7 +285,6 @@ class AccountControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||||
$repository->shouldReceive('find')->andReturn(new Account)->once();
|
|
||||||
$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());
|
$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());
|
||||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
@@ -313,7 +312,6 @@ class AccountControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||||
$repository->shouldReceive('find')->andReturn(new Account)->once();
|
|
||||||
$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());
|
$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());
|
||||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
@@ -339,7 +337,6 @@ class AccountControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||||
$repository->shouldReceive('find')->andReturn(new Account)->once();
|
|
||||||
$repository->shouldReceive('update')->once();
|
$repository->shouldReceive('update')->once();
|
||||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
@@ -365,7 +362,6 @@ class AccountControllerTest extends TestCase
|
|||||||
// mock stuff
|
// mock stuff
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||||
$repository->shouldReceive('find')->andReturn(new Account)->once();
|
|
||||||
$repository->shouldReceive('update')->once();
|
$repository->shouldReceive('update')->once();
|
||||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ class BulkControllerTest extends TestCase
|
|||||||
$repository->shouldReceive('updateBudget')->times(4)->andReturn(new TransactionJournal())
|
$repository->shouldReceive('updateBudget')->times(4)->andReturn(new TransactionJournal())
|
||||||
->withArgs([Mockery::any(), $data['budget_id']]);
|
->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]);
|
->withArgs([Mockery::any(), $tags]);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user