diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /spec/controllers/oauth/jira | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/controllers/oauth/jira')
-rw-r--r-- | spec/controllers/oauth/jira/authorizations_controller_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/controllers/oauth/jira/authorizations_controller_spec.rb b/spec/controllers/oauth/jira/authorizations_controller_spec.rb index 0b4a691d7ec..f4a335b30f4 100644 --- a/spec/controllers/oauth/jira/authorizations_controller_spec.rb +++ b/spec/controllers/oauth/jira/authorizations_controller_spec.rb @@ -5,10 +5,20 @@ require 'spec_helper' RSpec.describe Oauth::Jira::AuthorizationsController do describe 'GET new' do it 'redirects to OAuth authorization with correct params' do - get :new, params: { client_id: 'client-123', redirect_uri: 'http://example.com/' } + get :new, params: { client_id: 'client-123', scope: 'foo', redirect_uri: 'http://example.com/' } expect(response).to redirect_to(oauth_authorization_url(client_id: 'client-123', response_type: 'code', + scope: 'foo', + redirect_uri: oauth_jira_callback_url)) + end + + it 'replaces the GitHub "repo" scope with "api"' do + get :new, params: { client_id: 'client-123', scope: 'repo', redirect_uri: 'http://example.com/' } + + expect(response).to redirect_to(oauth_authorization_url(client_id: 'client-123', + response_type: 'code', + scope: 'api', redirect_uri: oauth_jira_callback_url)) end end |