mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-23 14:26:58 +00:00
First step in improving test coverage.
This commit is contained in:
@@ -163,7 +163,7 @@ class ProfileControllerTest extends TestCase
|
||||
public function testEnable2FANoSecret(): void
|
||||
{
|
||||
$repository = $this->mock(UserRepositoryInterface::class);
|
||||
$repository->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->twice()->andReturn(false);
|
||||
$repository->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->times(1)->andReturn(false);
|
||||
|
||||
// ask about language:
|
||||
$langPreference = new Preference;
|
||||
@@ -205,7 +205,7 @@ class ProfileControllerTest extends TestCase
|
||||
public function testEnable2FASecret(): void
|
||||
{
|
||||
$repository = $this->mock(UserRepositoryInterface::class);
|
||||
$repository->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->twice()->andReturn(false);
|
||||
$repository->shouldReceive('hasRole')->withArgs([Mockery::any(), 'demo'])->times(1)->andReturn(false);
|
||||
|
||||
// ask about language:
|
||||
$langPreference = new Preference;
|
||||
@@ -515,7 +515,7 @@ class ProfileControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\ProfileController
|
||||
* @covers \FireflyIII\Http\Controllers\ProfileController
|
||||
* @expectedExceptionMessage Invalid token
|
||||
*/
|
||||
public function testUndoEmailChangeBadHash(): void
|
||||
@@ -540,7 +540,7 @@ class ProfileControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\ProfileController
|
||||
* @covers \FireflyIII\Http\Controllers\ProfileController
|
||||
* @expectedExceptionMessage Invalid token
|
||||
*/
|
||||
public function testUndoEmailChangeBadToken(): void
|
||||
|
Reference in New Issue
Block a user