mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-20 03:10:57 +00:00
remove "twoFactorAuthEnabled" from preferences. Kill switches for all code that references them (easier for refactor)
This commit is contained in:
@@ -170,6 +170,7 @@ class ProfileControllerTest extends TestCase
|
||||
|
||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->atLeast()->once()->andReturn(false);
|
||||
|
||||
die('the references in this test to 2FA preferences must be refactored.');
|
||||
Preferences::shouldReceive('delete')->withArgs(['twoFactorAuthEnabled'])->atLeast()->once();
|
||||
Preferences::shouldReceive('delete')->withArgs(['twoFactorAuthSecret'])->atLeast()->once();
|
||||
|
||||
@@ -212,6 +213,7 @@ class ProfileControllerTest extends TestCase
|
||||
Preferences::shouldReceive('set')->once()->withArgs(['twoFactorAuthEnabled', 1]);
|
||||
//Preferences::shouldReceive('lastActivity')->once();
|
||||
|
||||
die('the references in this test to 2FA preferences must be refactored.');
|
||||
$pref = new Preference;
|
||||
$pref->data = false;
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->atLeast()->once()->andReturn($pref);
|
||||
@@ -220,6 +222,7 @@ class ProfileControllerTest extends TestCase
|
||||
$pref->data = 'super-secret';
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->atLeast()->once()->andReturn($pref);
|
||||
|
||||
|
||||
$view = new Preference;
|
||||
$view->data = '1M';
|
||||
Preferences::shouldReceive('get')->withArgs(['viewRange', Mockery::any()])->andReturn($view)->atLeast()->once();
|
||||
@@ -446,6 +449,7 @@ class ProfileControllerTest extends TestCase
|
||||
$this->withoutMiddleware();
|
||||
$this->session(['two-factor-secret' => $secret]);
|
||||
|
||||
die('the references in this test to 2FA preferences must be refactored.');
|
||||
Preferences::shouldReceive('set')->withArgs(['twoFactorAuthEnabled', 1])->once();
|
||||
Preferences::shouldReceive('set')->withArgs(['twoFactorAuthSecret', $secret])->once();
|
||||
Preferences::shouldReceive('mark')->once();
|
||||
|
Reference in New Issue
Block a user