mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Code cleanup and tests.
This commit is contained in:
@@ -41,10 +41,6 @@ class TwoFactorControllerTest extends TestCase
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference)->once();
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn($secretPreference)->once();
|
||||
|
||||
$falsePref = new Preference;
|
||||
$falsePref->data = false;
|
||||
Preferences::shouldReceive('get')->withArgs(['shown_demo_two-factor.index', false])->andReturn($falsePref)->once();
|
||||
|
||||
$response = $this->get(route('two-factor.index'));
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
@@ -61,7 +57,6 @@ class TwoFactorControllerTest extends TestCase
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference)->twice();
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn(null)->once();
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn(null)->once();
|
||||
Preferences::shouldReceive('get')->withArgs(['shown_demo_two-factor.index', false])->andReturn($falsePreference)->once();
|
||||
|
||||
$response = $this->get(route('two-factor.index'));
|
||||
$response->assertStatus(302);
|
||||
@@ -84,10 +79,6 @@ class TwoFactorControllerTest extends TestCase
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference)->once();
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn($secretPreference)->once();
|
||||
|
||||
$falsePref = new Preference;
|
||||
$falsePref->data = false;
|
||||
Preferences::shouldReceive('get')->withArgs(['shown_demo_two-factor.index', false])->andReturn($falsePref)->once();
|
||||
|
||||
$response = $this->get(route('two-factor.index'));
|
||||
$response->assertStatus(500);
|
||||
}
|
||||
@@ -107,10 +98,6 @@ class TwoFactorControllerTest extends TestCase
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference);
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn($secretPreference);
|
||||
|
||||
$falsePref = new Preference;
|
||||
$falsePref->data = false;
|
||||
Preferences::shouldReceive('get')->withArgs(['shown_demo_two-factor.lost', false])->andReturn($falsePref)->once();
|
||||
|
||||
$response = $this->get(route('two-factor.lost'));
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
Reference in New Issue
Block a user