diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-01-02 21:24:37 +0100 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2017-01-10 17:04:32 +0100 |
commit | fcda3a20f455795b898161ec4ada0aeb500b9218 (patch) | |
tree | d1819e6c04954377ede49bbf80ebc02335acf2a2 /tests/Core | |
parent | 40239decb1b36f1daff53710e01d81e18c24f4fc (diff) | |
download | nextcloud-server-fcda3a20f455795b898161ec4ada0aeb500b9218.tar.gz nextcloud-server-fcda3a20f455795b898161ec4ada0aeb500b9218.zip |
create new encryption keys on password reset and backup the old one
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'tests/Core')
-rw-r--r-- | tests/Core/Controller/LostControllerTest.php | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php index 3e7456648e4..0f9dcaead35 100644 --- a/tests/Core/Controller/LostControllerTest.php +++ b/tests/Core/Controller/LostControllerTest.php @@ -591,42 +591,4 @@ class LostControllerTest extends \Test\TestCase { $this->assertSame($expectedResponse, $response); } - public function testSetPasswordEncryptionProceed() { - - /** @var LostController | PHPUnit_Framework_MockObject_MockObject $lostController */ - $lostController = $this->getMockBuilder(LostController::class) - ->setConstructorArgs( - [ - 'Core', - $this->request, - $this->urlGenerator, - $this->userManager, - $this->defaults, - $this->l10n, - $this->config, - $this->secureRandom, - 'lostpassword-noreply@localhost', - $this->encryptionManager, - $this->mailer, - $this->timeFactory, - $this->crypto - ] - )->setMethods(['checkPasswordResetToken'])->getMock(); - - $lostController->expects($this->once())->method('checkPasswordResetToken')->willReturn(true); - - $user = $this->createMock(IUser::class); - $user->method('setPassword')->willReturnCallback( - function() { - throw new PrivateKeyMissingException('user'); - } - ); - $this->userManager->method('get')->with('user')->willReturn($user); - - $response = $lostController->setPassword('myToken', 'user', 'newpass', true); - - $expectedResponse = ['status' => 'success']; - $this->assertSame($expectedResponse, $response); - } - } |