mirror of
https://github.com/elyby/accounts.git
synced 2025-01-01 01:50:25 +05:30
29 lines
781 B
PHP
29 lines
781 B
PHP
<?php
|
|
namespace tests\codeception\api\functional\accounts;
|
|
|
|
use tests\codeception\api\_pages\AccountsRoute;
|
|
use tests\codeception\api\FunctionalTester;
|
|
|
|
class TwoFactorAuthCredentialsCest {
|
|
|
|
/**
|
|
* @var AccountsRoute
|
|
*/
|
|
private $route;
|
|
|
|
public function _before(FunctionalTester $I) {
|
|
$this->route = new AccountsRoute($I);
|
|
}
|
|
|
|
public function testGetCredentials(FunctionalTester $I) {
|
|
$accountId = $I->amAuthenticated();
|
|
$this->route->getTwoFactorAuthCredentials($accountId);
|
|
$I->canSeeResponseCodeIs(200);
|
|
$I->canSeeResponseIsJson();
|
|
$I->canSeeResponseJsonMatchesJsonPath('$.secret');
|
|
$I->canSeeResponseJsonMatchesJsonPath('$.uri');
|
|
$I->canSeeResponseJsonMatchesJsonPath('$.qr');
|
|
}
|
|
|
|
}
|