summaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes/tests
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2018-08-21 06:49:26 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2018-08-21 06:49:26 +0200
commit42035cab9dfb5dfc4f12b7118c426fd20f7c36d3 (patch)
treef3e59cff6ef291ecc7c3b66f785a2c05443de6b1 /apps/twofactor_backupcodes/tests
parentbe3438ca9706f856af6fb59617d35a516d274f30 (diff)
downloadnextcloud-server-42035cab9dfb5dfc4f12b7118c426fd20f7c36d3.tar.gz
nextcloud-server-42035cab9dfb5dfc4f12b7118c426fd20f7c36d3.zip
Add an integration test that inserts long back codes values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/twofactor_backupcodes/tests')
-rw-r--r--apps/twofactor_backupcodes/tests/Integration/Db/BackupCodeMapperTest.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/twofactor_backupcodes/tests/Integration/Db/BackupCodeMapperTest.php b/apps/twofactor_backupcodes/tests/Integration/Db/BackupCodeMapperTest.php
index c788262231a..6640a1c0ebf 100644
--- a/apps/twofactor_backupcodes/tests/Integration/Db/BackupCodeMapperTest.php
+++ b/apps/twofactor_backupcodes/tests/Integration/Db/BackupCodeMapperTest.php
@@ -109,4 +109,13 @@ class BackupCodeMapperTest extends TestCase {
$this->assertCount(0, $this->mapper->getBackupCodes($user));
}
+ public function testInsertArgonEncryptedCodes() {
+ $code = new BackupCode();
+ $code->setUserId($this->testUID);
+ $code->setCode('2|$argon2i$v=19$m=1024,t=2,p=2$MjJWUjRFWndtMm5BWGxOag$BusVxLeFyiLLWtaVvX/JRFBiPdZcjRrzpQ/rAhn6vqY');
+ $code->setUsed(1);
+
+ $this->mapper->insert($code);
+ }
+
}