summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-07-23 17:11:10 +0200
committerGitHub <noreply@github.com>2020-07-23 17:11:10 +0200
commitf8955bd0d1fe3e51d88831bc4f4c934bdef1256a (patch)
tree554cbf687be448f0b7009dfc96f70d337703698f /apps
parentcdf095d107dc11f413be9ac2d9d7c5280ac7f3b8 (diff)
parent49f33ee632c3815313f084fa4251a071189b3a7e (diff)
downloadnextcloud-server-f8955bd0d1fe3e51d88831bc4f4c934bdef1256a.tar.gz
nextcloud-server-f8955bd0d1fe3e51d88831bc4f4c934bdef1256a.zip
Merge pull request #21973 from nextcloud/techdebt/noid/fix-risky-2fa-backup-code-test
Fix risky test in twofactor_backupcodes
Diffstat (limited to 'apps')
-rw-r--r--apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php
index ae5a10232e9..489ca74f3c6 100644
--- a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php
+++ b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php
@@ -117,7 +117,12 @@ class BackupCodeMapperTest extends TestCase {
$code->setUserId($this->testUID);
$code->setCode('2|$argon2i$v=19$m=1024,t=2,p=2$MjJWUjRFWndtMm5BWGxOag$BusVxLeFyiLLWtaVvX/JRFBiPdZcjRrzpQ/rAhn6vqY');
$code->setUsed(1);
+ $user = $this->getMockBuilder(IUser::class)->getMock();
+ $user->expects($this->any())
+ ->method('getUID')
+ ->willReturn($this->testUID);
$this->mapper->insert($code);
+ $this->assertCount(1, $this->mapper->getBackupCodes($user));
}
}