mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 10:16:49 +00:00
Fix tests
This commit is contained in:
@@ -44,7 +44,7 @@ class BudgetControllerTest extends TestCase
|
||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
$repository->shouldReceive('updateLimitAmount')->andReturn(new BudgetLimit);
|
||||
|
||||
$data = ['amount' => 200,];
|
||||
$data = ['amount' => 200, 'start' => '2017-01-01', 'end' => '2017-01-31'];
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('budgets.amount', [1]), $data);
|
||||
$response->assertStatus(200);
|
||||
@@ -61,7 +61,7 @@ class BudgetControllerTest extends TestCase
|
||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
$repository->shouldReceive('updateLimitAmount')->andReturn(new BudgetLimit);
|
||||
|
||||
$data = ['amount' => 0,];
|
||||
$data = ['amount' => 0, 'start' => '2017-01-01', 'end' => '2017-01-31'];
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('budgets.amount', [1]), $data);
|
||||
$response->assertStatus(200);
|
||||
@@ -542,7 +542,7 @@ class BudgetControllerTest extends TestCase
|
||||
$repository->shouldReceive('getAvailableBudget')->andReturn('1');
|
||||
$repository->shouldReceive('cleanupBudgets');
|
||||
|
||||
$response = $this->get(route('budgets.income', [1]));
|
||||
$response = $this->get(route('budgets.income', ['2017-01-01', '2017-01-31']));
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
|
@@ -129,6 +129,9 @@ class TagControllerTest extends TestCase
|
||||
$repository->shouldReceive('firstUseDate')->andReturn(new Carbon)->once();
|
||||
$repository->shouldReceive('lastUseDate')->andReturn(new Carbon)->once();
|
||||
$repository->shouldReceive('earnedInPeriod')->andReturn('1')->once();
|
||||
$repository->shouldReceive('sumOfTag')->andReturn('1')->once();
|
||||
$repository->shouldReceive('resultOfTag')->andReturn('1')->once();
|
||||
|
||||
|
||||
$collector->shouldReceive('removeFilter')->andReturnSelf()->once();
|
||||
|
||||
@@ -161,6 +164,8 @@ class TagControllerTest extends TestCase
|
||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
$repository->shouldReceive('firstUseDate')->andReturn(new Carbon)->once();
|
||||
|
||||
$repository->shouldReceive('resultOfTag')->andReturn('1')->once();
|
||||
|
||||
$collector->shouldReceive('removeFilter')->andReturnSelf()->once();
|
||||
$repository->shouldReceive('sumOfTag')->andReturn('1')->once();
|
||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf()->once();
|
||||
@@ -195,6 +200,7 @@ class TagControllerTest extends TestCase
|
||||
$repository->shouldReceive('lastUseDate')->andReturn(new Carbon)->once();
|
||||
$repository->shouldReceive('earnedInPeriod')->andReturn('1')->once();
|
||||
$repository->shouldReceive('sumOfTag')->andReturn('1')->once();
|
||||
$repository->shouldReceive('resultOfTag')->andReturn('1')->once();
|
||||
|
||||
$collector->shouldReceive('removeFilter')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf()->once();
|
||||
|
Reference in New Issue
Block a user