mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix budget controller tests.
This commit is contained in:
parent
140a5b20db
commit
9f37bf5875
@ -433,6 +433,7 @@ class BudgetControllerTest extends TestCase
|
|||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('setAvailableBudget');
|
$repository->shouldReceive('setAvailableBudget');
|
||||||
|
$repository->shouldReceive('cleanupBudgets');
|
||||||
|
|
||||||
$data = ['amount' => '200', 'start' => '2017-01-01', 'end' => '2017-01-31'];
|
$data = ['amount' => '200', 'start' => '2017-01-01', 'end' => '2017-01-31'];
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@ -549,6 +550,8 @@ class BudgetControllerTest extends TestCase
|
|||||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('find')->andReturn($budget);
|
$repository->shouldReceive('find')->andReturn($budget);
|
||||||
$repository->shouldReceive('store')->andReturn($budget);
|
$repository->shouldReceive('store')->andReturn($budget);
|
||||||
|
$repository->shouldReceive('cleanupBudgets');
|
||||||
|
|
||||||
$this->session(['budgets.create.uri' => 'http://localhost']);
|
$this->session(['budgets.create.uri' => 'http://localhost']);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
@ -572,6 +575,7 @@ class BudgetControllerTest extends TestCase
|
|||||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||||
$repository->shouldReceive('find')->andReturn($budget);
|
$repository->shouldReceive('find')->andReturn($budget);
|
||||||
$repository->shouldReceive('update');
|
$repository->shouldReceive('update');
|
||||||
|
$repository->shouldReceive('cleanupBudgets');
|
||||||
|
|
||||||
$this->session(['budgets.edit.uri' => 'http://localhost']);
|
$this->session(['budgets.edit.uri' => 'http://localhost']);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user