diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /spec/controllers/oauth | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/controllers/oauth')
-rw-r--r-- | spec/controllers/oauth/token_info_controller_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/controllers/oauth/token_info_controller_spec.rb b/spec/controllers/oauth/token_info_controller_spec.rb index 4b3539879df..4658c2702ca 100644 --- a/spec/controllers/oauth/token_info_controller_spec.rb +++ b/spec/controllers/oauth/token_info_controller_spec.rb @@ -9,7 +9,7 @@ RSpec.describe Oauth::TokenInfoController do get :show expect(response).to have_gitlab_http_status(:unauthorized) - expect(JSON.parse(response.body)).to include('error' => 'invalid_request') + expect(Gitlab::Json.parse(response.body)).to include('error' => 'invalid_request') end end @@ -23,7 +23,7 @@ RSpec.describe Oauth::TokenInfoController do get :show, params: { access_token: access_token.token } expect(response).to have_gitlab_http_status(:ok) - expect(JSON.parse(response.body)).to eq( + expect(Gitlab::Json.parse(response.body)).to eq( 'scope' => %w[api], 'scopes' => %w[api], 'created_at' => access_token.created_at.to_i, @@ -40,7 +40,7 @@ RSpec.describe Oauth::TokenInfoController do get :show, params: { access_token: 'unknown_token' } expect(response).to have_gitlab_http_status(:unauthorized) - expect(JSON.parse(response.body)).to include('error' => 'invalid_request') + expect(Gitlab::Json.parse(response.body)).to include('error' => 'invalid_request') end end @@ -53,7 +53,7 @@ RSpec.describe Oauth::TokenInfoController do get :show, params: { access_token: access_token.token } expect(response).to have_gitlab_http_status(:unauthorized) - expect(JSON.parse(response.body)).to include('error' => 'invalid_request') + expect(Gitlab::Json.parse(response.body)).to include('error' => 'invalid_request') end end @@ -64,7 +64,7 @@ RSpec.describe Oauth::TokenInfoController do get :show, params: { access_token: access_token.token } expect(response).to have_gitlab_http_status(:unauthorized) - expect(JSON.parse(response.body)).to include('error' => 'invalid_request') + expect(Gitlab::Json.parse(response.body)).to include('error' => 'invalid_request') end end end |