mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Ререализован метод для получения инфы о конфигурации API
This commit is contained in:
@@ -8,8 +8,8 @@ use yii\codeception\BasePage;
|
||||
*/
|
||||
class OptionsRoute extends BasePage {
|
||||
|
||||
public function recaptchaPublicKey() {
|
||||
$this->route = ['options/recaptcha-public-key'];
|
||||
public function get() {
|
||||
$this->route = ['options/index'];
|
||||
$this->actor->sendGET($this->getUrl());
|
||||
}
|
||||
|
||||
|
||||
@@ -18,11 +18,12 @@ class OptionsCest {
|
||||
public function testRecaptchaPublicKey(FunctionalTester $I) {
|
||||
$I->wantTo('Get recaptcha public key');
|
||||
|
||||
$this->route->recaptchaPublicKey();
|
||||
$this->route->get();
|
||||
$I->canSeeResponseCodeIs(200);
|
||||
// TODO: эта проверка не проходит, т.к внутри почему-то после запроса не устанавливаются http заголовки
|
||||
//$I->seeHttpHeader('Content-Type', 'text/html; charset=UTF-8');
|
||||
$I->canSeeResponseEquals('public-key');
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->canSeeResponseContainsJson([
|
||||
'reCaptchaPublicKey' => 'public-key',
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user