From e57ce6e644cd58f9840b29499250ad915edfa865 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 5 Apr 2015 15:25:35 +0200 Subject: [PATCH] Test now works. --- tests/controllers/BudgetControllerTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/controllers/BudgetControllerTest.php b/tests/controllers/BudgetControllerTest.php index 935f491544..10155ba108 100644 --- a/tests/controllers/BudgetControllerTest.php +++ b/tests/controllers/BudgetControllerTest.php @@ -138,11 +138,14 @@ class BudgetControllerTest extends TestCase public function testPostUpdateIncome() { + $budget = FactoryMuffin::create('FireflyIII\Models\Budget'); + $this->be($budget->user); $date = Carbon::now()->startOfMonth()->format('FY'); Preferences::shouldReceive('set')->once()->withArgs(['budgetIncomeTotal' . $date, 1001]); $this->call('POST', '/budgets/income', ['_token' => 'replaceme', 'amount' => 1001]); $this->assertResponseStatus(302); + $this->assertRedirectedToRoute('budgets.index'); } public function testShow()