mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Добавлены тесты для включения/отключения OTP
This commit is contained in:
@@ -8,9 +8,24 @@ use yii\codeception\BasePage;
|
||||
*/
|
||||
class TwoFactorAuthRoute extends BasePage {
|
||||
|
||||
public $route = '/two-factor-auth';
|
||||
|
||||
public function credentials() {
|
||||
$this->route = '/two-factor-auth';
|
||||
$this->actor->sendGET($this->getUrl());
|
||||
}
|
||||
|
||||
public function enable($token = null, $password = null) {
|
||||
$this->actor->sendPOST($this->getUrl(), [
|
||||
'token' => $token,
|
||||
'password' => $password,
|
||||
]);
|
||||
}
|
||||
|
||||
public function disable($token = null, $password = null) {
|
||||
$this->actor->sendDELETE($this->getUrl(), [
|
||||
'token' => $token,
|
||||
'password' => $password,
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user