mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 02:45:58 +00:00
Refactor tests and code to handle new 2FA methods.
This commit is contained in:
@@ -102,19 +102,10 @@ class UserControllerTest extends TestCase
|
||||
*/
|
||||
public function testIndex(): void
|
||||
{
|
||||
die('this test references old 2FA code.');
|
||||
$repository = $this->mock(UserRepositoryInterface::class);
|
||||
$repository->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->times(3)->andReturn(true);
|
||||
$user = $this->user();
|
||||
$repository->shouldReceive('all')->andReturn(new Collection([$user]));
|
||||
|
||||
Preferences::shouldReceive('getArrayForUser')->atLeast()->once()->andReturn(
|
||||
[
|
||||
'twoFactorAuthEnabled' => false,
|
||||
'twoFactorAuthSecret' => null,
|
||||
]
|
||||
);
|
||||
|
||||
$this->mockDefaultSession();
|
||||
|
||||
$this->be($user);
|
||||
|
Reference in New Issue
Block a user