mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 07:08:19 +00:00
Code cleanup for #595
This commit is contained in:
@@ -42,6 +42,23 @@ class BudgetControllerTest extends TestCase
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\BudgetController::amount
|
||||
*/
|
||||
public function testAmountZero()
|
||||
{
|
||||
// mock stuff
|
||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
$repository->shouldReceive('updateLimitAmount')->andReturn(new BudgetLimit);
|
||||
|
||||
$data = ['amount' => 0,];
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('budgets.amount', [1]), $data);
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\BudgetController::create
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user