Should fix tests.

This commit is contained in:
James Cole
2015-06-03 21:15:52 +02:00
parent a7f6848e53
commit 409ec2e086
21 changed files with 151 additions and 132 deletions

View File

@@ -60,6 +60,14 @@ class ChartBillControllerTest extends TestCase
$repository->shouldReceive('createFakeBill')->andReturn($bills->first());
Steam::shouldReceive('balance')->andReturn(-10, 0);
$lastActivity = FactoryMuffin::create('FireflyIII\Models\Preference');
$lastActivity->data = microtime();
Preferences::shouldReceive('lastActivity')->andReturn($lastActivity);
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
$language->data = 'en';
Preferences::shouldReceive('get')->withArgs(['language', 'en'])->andReturn($language);
$this->call('GET', '/chart/bill/frontpage');
$this->assertResponseOk();