Fixed tests.

This commit is contained in:
James Cole
2015-06-02 17:58:30 +02:00
parent 71947c097f
commit 616c849b1f
7 changed files with 16 additions and 18 deletions

View File

@@ -69,6 +69,7 @@ class AccountControllerTest extends TestCase
Preferences::shouldReceive('get')->withArgs(['viewRange', '1M'])->andReturn($pref);
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
$language->data = 'en';
Preferences::shouldReceive('get')->withArgs(['language', 'en'])->andReturn($language);

View File

@@ -188,6 +188,7 @@ class BillControllerTest extends TestCase
$repository->shouldReceive('nextExpectedMatch')->once()->andReturn(new Carbon);
Amount::shouldReceive('format')->andReturn('XX');
Amount::shouldReceive('formatJournal')->andReturn('XX');
Amount::shouldReceive('getCurrencyCode')->andReturn('XX');

View File

@@ -193,6 +193,7 @@ class BudgetControllerTest extends TestCase
$this->be($budget->user);
$date = Carbon::now()->startOfMonth()->format('FY');
Preferences::shouldReceive('set')->once()->withArgs(['budgetIncomeTotal' . $date, 1001]);
Preferences::shouldReceive('mark')->once()->andReturn(true);
// language preference:
$language = FactoryMuffin::create('FireflyIII\Models\Preference');

View File

@@ -97,6 +97,7 @@ class PreferencesControllerTest extends TestCase
Preferences::shouldReceive('set')->once()->withArgs(['viewRange', '1M']);
Preferences::shouldReceive('set')->once()->withArgs(['budgetMaximum', 0]);
Preferences::shouldReceive('set')->once()->withArgs(['language', 'en']);
Preferences::shouldReceive('mark')->once()->andReturn(true);
// language preference:
$language = FactoryMuffin::create('FireflyIII\Models\Preference');