summaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-11-02 15:16:14 +0100
committerLukas Reschke <lukas@statuscode.ch>2016-11-18 12:10:51 +0100
commitb2d9c20aac35e92e7a7b6838e02c7170991ef352 (patch)
tree06ec1da4c8fc98cf7dba15f357ca52e444b4ab98 /apps/twofactor_backupcodes
parent922f51e9014d8331e9a593911de152ab20bd4811 (diff)
downloadnextcloud-server-b2d9c20aac35e92e7a7b6838e02c7170991ef352.tar.gz
nextcloud-server-b2d9c20aac35e92e7a7b6838e02c7170991ef352.zip
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/twofactor_backupcodes')
-rw-r--r--apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php
index c7ac33467b3..8427c10e839 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php
@@ -24,6 +24,7 @@ namespace OCA\TwoFactorBackupCodes\Tests\Unit\Controller;
use OCA\TwoFactorBackupCodes\Controller\SettingsController;
use OCA\TwoFactorBackupCodes\Service\BackupCodeStorage;
+use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
use OCP\IUser;
use OCP\IUserSession;
@@ -89,7 +90,9 @@ class SettingsControllerTest extends TestCase {
'codes' => $codes,
'state' => 'state',
];
- $this->assertEquals($expected, $this->controller->createCodes());
+ $response = $this->controller->createCodes();
+ $this->assertInstanceOf(JSONResponse::class, $response);
+ $this->assertEquals($expected, $response->getData());
}
}