summaryrefslogtreecommitdiffstats
path: root/tests/Core
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-01-13 11:28:43 +0100
committerGitHub <noreply@github.com>2017-01-13 11:28:43 +0100
commit622101f2dd43f618fa278976e38df8541f145bb6 (patch)
tree4e16e7c1839079b46334767659e3f4cf841b17cd /tests/Core
parent00c3f807db59f69cac37429f1b4be424720371e3 (diff)
parentfcda3a20f455795b898161ec4ada0aeb500b9218 (diff)
downloadnextcloud-server-622101f2dd43f618fa278976e38df8541f145bb6.tar.gz
nextcloud-server-622101f2dd43f618fa278976e38df8541f145bb6.zip
Merge pull request #2918 from nextcloud/encryption-recovery-improvements
create new encryption keys on password reset and backup the old one
Diffstat (limited to 'tests/Core')
-rw-r--r--tests/Core/Controller/LostControllerTest.php38
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);
- }
-
}