From 6af79ef601e05c62ec12efcdcf401b0949665259 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 May 2015 23:08:55 +0200 Subject: [PATCH] Fixed tests --- tests/controllers/BudgetControllerTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/controllers/BudgetControllerTest.php b/tests/controllers/BudgetControllerTest.php index 24dd1c5a77..7d4bfd2595 100644 --- a/tests/controllers/BudgetControllerTest.php +++ b/tests/controllers/BudgetControllerTest.php @@ -122,7 +122,8 @@ class BudgetControllerTest extends TestCase */ public function testIndex() { - $budget = FactoryMuffin::create('FireflyIII\Models\Budget'); + $currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency'); + $budget = FactoryMuffin::create('FireflyIII\Models\Budget'); $this->be($budget->user); $collection = new Collection; $collection->push($budget); @@ -136,6 +137,7 @@ class BudgetControllerTest extends TestCase Amount::shouldReceive('getCurrencySymbol')->andReturn('x'); Amount::shouldReceive('format')->andReturn('x'); Amount::shouldReceive('getCurrencyCode')->andReturn('X'); + Amount::shouldReceive('getDefaultCurrency')->andReturn($currency); $this->call('GET', '/budgets'); $this->assertResponseOk();