Fix some tests.

This commit is contained in:
James Cole
2016-12-09 16:30:33 +01:00
parent 3f56a8ec53
commit cf34713518
6 changed files with 26 additions and 129 deletions

View File

@@ -49,7 +49,7 @@ class ConfirmationControllerTest extends TestCase
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference);
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn(null);
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->once()->andReturn($trueConfig);
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->andReturn($trueConfig);
$this->be($this->user());
$this->call('GET', route('confirmation_error'));
$this->assertResponseStatus(200);
@@ -100,11 +100,11 @@ class ConfirmationControllerTest extends TestCase
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);
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->once()->andReturn($trueConfig);
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->andReturn($trueConfig);
Preferences::shouldReceive('get')->withArgs(['user_confirmed', false])->andReturn($falsePreference);
// from event handler:
Preferences::shouldReceive('setForUser')->withAnyArgs()->once();
Preferences::shouldReceive('setForUser')->withAnyArgs();
$this->be($this->user());
$this->call('GET', route('resend_confirmation'));