mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 05:06:37 +00:00
Fix tests.
This commit is contained in:
@@ -48,7 +48,7 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
|
|
||||||
FireflyConfig::shouldReceive('get')->withArgs(['single_user_mode', true])->once()->andReturn($trueConfig);
|
FireflyConfig::shouldReceive('get')->withArgs(['single_user_mode', true])->once()->andReturn($trueConfig);
|
||||||
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->once()->andReturn($falseConfig);
|
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->once()->andReturn($falseConfig);
|
||||||
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->times(2)->andReturn($falseConfig);
|
||||||
|
|
||||||
// new settings:
|
// new settings:
|
||||||
FireflyConfig::shouldReceive('get')->withArgs(['mail_for_lockout', false])->once()->andReturn($falseConfig);
|
FireflyConfig::shouldReceive('get')->withArgs(['mail_for_lockout', false])->once()->andReturn($falseConfig);
|
||||||
@@ -69,7 +69,10 @@ class ConfigurationControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testPostIndex()
|
public function testPostIndex()
|
||||||
{
|
{
|
||||||
|
$falseConfig = new Configuration;
|
||||||
|
$falseConfig->data = false;
|
||||||
|
|
||||||
|
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
||||||
FireflyConfig::shouldReceive('set')->withArgs(['single_user_mode', false])->once();
|
FireflyConfig::shouldReceive('set')->withArgs(['single_user_mode', false])->once();
|
||||||
FireflyConfig::shouldReceive('set')->withArgs(['must_confirm_account', false])->once();
|
FireflyConfig::shouldReceive('set')->withArgs(['must_confirm_account', false])->once();
|
||||||
FireflyConfig::shouldReceive('set')->withArgs(['is_demo_site', false])->once();
|
FireflyConfig::shouldReceive('set')->withArgs(['is_demo_site', false])->once();
|
||||||
|
|||||||
@@ -48,6 +48,11 @@ class ConfirmationControllerTest extends TestCase
|
|||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference);
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference);
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn(null);
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn(null);
|
||||||
|
|
||||||
|
$falseConfig = new Configuration;
|
||||||
|
$falseConfig->data = false;
|
||||||
|
|
||||||
|
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
||||||
|
|
||||||
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->andReturn($trueConfig);
|
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->andReturn($trueConfig);
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('GET', route('confirmation_error'));
|
$this->call('GET', route('confirmation_error'));
|
||||||
@@ -94,6 +99,11 @@ class ConfirmationControllerTest extends TestCase
|
|||||||
$falsePreference = new Preference;
|
$falsePreference = new Preference;
|
||||||
$falsePreference->data = false;
|
$falsePreference->data = false;
|
||||||
|
|
||||||
|
$falseConfig = new Configuration;
|
||||||
|
$falseConfig->data = false;
|
||||||
|
|
||||||
|
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig);
|
||||||
|
|
||||||
Preferences::shouldReceive('get')->withArgs(['user_confirmed_last_mail', 0])->andReturn($timePreference);
|
Preferences::shouldReceive('get')->withArgs(['user_confirmed_last_mail', 0])->andReturn($timePreference);
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference);
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference);
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn(null);
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user