Fixed all tests.

This commit is contained in:
James Cole
2014-07-15 07:36:01 +02:00
parent 09b6c4d982
commit 445de5a1d8
7 changed files with 131 additions and 42 deletions

View File

@@ -26,10 +26,8 @@ class HomeControllerTest extends TestCase
$accounts->shouldReceive('count')->andReturn(0);
$accounts->shouldReceive('getActiveDefault')->andReturn([]);
// mock preferences helper:
$preferences = $this->mock('Firefly\Helper\Preferences\PreferencesHelperInterface');
$preferences->shouldReceive('get')->with('frontpageAccounts',[])->andReturn(new \Preference)->once();
$preferences->shouldReceive('get')->with('viewRange', 'week')->once()->andReturn('week');
// call
$this->call('GET', '/');
@@ -73,7 +71,6 @@ class HomeControllerTest extends TestCase
$preferences = $this->mock('Firefly\Helper\Preferences\PreferencesHelperInterface');
$preferences->shouldReceive('get')->with('frontpageAccounts',[])->andReturn($pref)->once();
$preferences->shouldReceive('get')->with('viewRange', 'week')->once()->andReturn('week');
// call
$this->call('GET', '/');