Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2021-04-20 21:44:33 +0300
committerGitHub <noreply@github.com>2021-04-20 21:44:33 +0300
commit85bdf6c0fcbb019d4c039af81581014d7b819436 (patch)
treedd1bdb78ae01429f1bee774282e7df2db8364c7a /apps
parentd34d3d168d9ceab5e56fa49f7a378dd2329a8ebe (diff)
parentfe8d98f84b36325ccf02dc0cdc85872ddbb4e5d0 (diff)
Merge pull request #26660 from nextcloud/bugfix/noid/fix-twofactor-backupcodes-tests
Fix twofactor backup code tests
Diffstat (limited to 'apps')
-rw-r--r--apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php4
-rw-r--r--apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php3
2 files changed, 3 insertions, 4 deletions
diff --git a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php
index db048a42749..e74f08043f7 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php
@@ -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);
diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php
index 4a32faf0f67..4d93110514a 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php
@@ -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);
}