Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 00:08:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 00:08:05 +0300
commitabae8f34f377519946a91101ef7abf504454531c (patch)
tree359fab0082860b6850d4a0a492b8f12eb3d4eb0b /spec/controllers/oauth
parent580622bdb3c762a8e89facd8a3946881ee480442 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/oauth')
-rw-r--r--spec/controllers/oauth/token_info_controller_spec.rb10
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 35ad0dcf98c..4b3539879df 100644
--- a/spec/controllers/oauth/token_info_controller_spec.rb
+++ b/spec/controllers/oauth/token_info_controller_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Oauth::TokenInfoController do
it 'responds with a 401' do
get :show
- expect(response.status).to eq 401
+ expect(response).to have_gitlab_http_status(:unauthorized)
expect(JSON.parse(response.body)).to include('error' => 'invalid_request')
end
end
@@ -22,7 +22,7 @@ RSpec.describe Oauth::TokenInfoController do
it 'responds with the token info' do
get :show, params: { access_token: access_token.token }
- expect(response.status).to eq 200
+ expect(response).to have_gitlab_http_status(:ok)
expect(JSON.parse(response.body)).to eq(
'scope' => %w[api],
'scopes' => %w[api],
@@ -39,7 +39,7 @@ RSpec.describe Oauth::TokenInfoController do
it 'responds with a 401' do
get :show, params: { access_token: 'unknown_token' }
- expect(response.status).to eq 401
+ expect(response).to have_gitlab_http_status(:unauthorized)
expect(JSON.parse(response.body)).to include('error' => 'invalid_request')
end
end
@@ -52,7 +52,7 @@ RSpec.describe Oauth::TokenInfoController do
it 'responds with a 401' do
get :show, params: { access_token: access_token.token }
- expect(response.status).to eq 401
+ expect(response).to have_gitlab_http_status(:unauthorized)
expect(JSON.parse(response.body)).to include('error' => 'invalid_request')
end
end
@@ -63,7 +63,7 @@ RSpec.describe Oauth::TokenInfoController do
it 'responds with a 401' do
get :show, params: { access_token: access_token.token }
- expect(response.status).to eq 401
+ expect(response).to have_gitlab_http_status(:unauthorized)
expect(JSON.parse(response.body)).to include('error' => 'invalid_request')
end
end