mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 03:53:37 +00:00
Should fix tests.
This commit is contained in:
@@ -62,6 +62,10 @@ class PreferencesControllerTest extends TestCase
|
||||
Amount::shouldReceive('getAllCurrencies')->andReturn(new Collection);
|
||||
Amount::shouldReceive('getDefaultCurrency')->andReturn($currency);
|
||||
|
||||
$lastActivity = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$lastActivity->data = microtime();
|
||||
Preferences::shouldReceive('lastActivity')->andReturn($lastActivity);
|
||||
|
||||
// language preference:
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language->data = 'en';
|
||||
@@ -105,6 +109,10 @@ class PreferencesControllerTest extends TestCase
|
||||
$language->save();
|
||||
Preferences::shouldReceive('get')->withAnyArgs()->andReturn($language);
|
||||
|
||||
$lastActivity = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$lastActivity->data = microtime();
|
||||
Preferences::shouldReceive('lastActivity')->andReturn($lastActivity);
|
||||
|
||||
|
||||
$this->call('POST', '/preferences', $data);
|
||||
$this->assertResponseStatus(302);
|
||||
|
Reference in New Issue
Block a user