diff --git a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php index 0555d656bd..6c3e6f4f44 100644 --- a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php +++ b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php @@ -48,7 +48,7 @@ class ConfigurationControllerTest extends TestCase 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(['is_demo_site', false])->once()->andReturn($falseConfig); + FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->times(2)->andReturn($falseConfig); // new settings: FireflyConfig::shouldReceive('get')->withArgs(['mail_for_lockout', false])->once()->andReturn($falseConfig); @@ -69,7 +69,10 @@ class ConfigurationControllerTest extends TestCase */ 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(['must_confirm_account', false])->once(); FireflyConfig::shouldReceive('set')->withArgs(['is_demo_site', false])->once(); diff --git a/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php b/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php index d4dd7aff33..c1e5cfa0cb 100644 --- a/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php +++ b/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php @@ -48,6 +48,11 @@ class ConfirmationControllerTest extends TestCase Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference); 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); $this->be($this->user()); $this->call('GET', route('confirmation_error')); @@ -94,6 +99,11 @@ class ConfirmationControllerTest extends TestCase $falsePreference = new Preference; $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(['twoFactorAuthEnabled', false])->andReturn($falsePreference); Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn(null);