mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Добавлена поддержка для "внутренних" scopes, запросить которые во время oauth процесса нельзя
This commit is contained in:
@@ -281,6 +281,21 @@ class OauthAuthCodeCest {
|
||||
'statusCode' => 400,
|
||||
]);
|
||||
$I->canSeeResponseJsonMatchesJsonPath('$.redirectUri');
|
||||
|
||||
$I->wantTo('check behavior on request internal scope');
|
||||
$this->route->$action($this->buildQueryParams('ely', 'http://ely.by', 'code', [
|
||||
S::MINECRAFT_SERVER_SESSION,
|
||||
S::ACCOUNT_BLOCK,
|
||||
]));
|
||||
$I->canSeeResponseCodeIs(400);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->canSeeResponseContainsJson([
|
||||
'success' => false,
|
||||
'error' => 'invalid_scope',
|
||||
'parameter' => S::ACCOUNT_BLOCK,
|
||||
'statusCode' => 400,
|
||||
]);
|
||||
$I->canSeeResponseJsonMatchesJsonPath('$.redirectUri');
|
||||
}
|
||||
|
||||
}
|
||||
|
12
tests/codeception/common/unit/models/OauthScopeTest.php
Normal file
12
tests/codeception/common/unit/models/OauthScopeTest.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace tests\codeception\common\unit\models;
|
||||
|
||||
use tests\codeception\common\unit\TestCase;
|
||||
|
||||
class OauthScopeTest extends TestCase {
|
||||
|
||||
public function testTest() {
|
||||
$scopes = \common\models\OauthScope::getScopes();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user