Теперь на этапе включения TOTP код может истечь в течение 2 периодов

This commit is contained in:
ErickSkrauch committed 2017-11-20 20:48:43 +03:00
1 parent dab0ab4cba
commit 47b6761f78
3 files changed
+13 -2

No files matched your search

@@ -58,4 +58,15 @@ class EnableTwoFactorAuthCest {
]);
}
public function testSuccessEnableWithNotSoExpiredCode(FunctionalTester $I) {
$accountId = $I->amAuthenticated('AccountWithOtpSecret');
$totp = TOTP::create('AAAA');
$this->route->enableTwoFactorAuth($accountId, $totp->at(time() - 35), 'password_0');
$I->canSeeResponseCodeIs(200);
$I->canSeeResponseIsJson();
$I->canSeeResponseContainsJson([
'success' => true,
]);
}
}