Merge pull request #26660 from nextcloud/bugfix/noid/fix-twofactor-backupcodes-tests

Fix twofactor backup code tests
This commit is contained in:
Roeland Jago Douma 2021-04-20 20:44:33 +02:00 committed by GitHub
commit 85bdf6c0fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -75,11 +75,11 @@ class SettingsControllerTest extends TestCase {
$this->storage->expects($this->once())
->method('getBackupCodesState')
->with($user)
->willReturn('state');
->willReturn(['state']);
$expected = [
'codes' => $codes,
'state' => 'state',
'state' => ['state'],
];
$response = $this->controller->createCodes();
$this->assertInstanceOf(JSONResponse::class, $response);

View File

@ -89,8 +89,7 @@ class ActivityPublisherTest extends TestCase {
->with('fritz')
->willReturnSelf();
$this->activityManager->expects($this->once())
->method('publish')
->willReturn($activityEvent);
->method('publish');
$this->listener->handle($event);
}