2020-09-01 08:11:01 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe 'JIRA OAuth Provider' do
|
|
|
|
describe 'JIRA DVCS OAuth Authorization' do
|
2022-03-20 23:08:23 -04:00
|
|
|
let(:application) { create(:oauth_application, redirect_uri: oauth_jira_dvcs_callback_url, scopes: 'read_user') }
|
2020-09-01 08:11:01 -04:00
|
|
|
|
|
|
|
before do
|
|
|
|
sign_in(user)
|
|
|
|
|
2022-03-20 23:08:23 -04:00
|
|
|
visit oauth_jira_dvcs_authorize_path(client_id: application.uid,
|
|
|
|
redirect_uri: oauth_jira_dvcs_callback_url,
|
2020-09-01 08:11:01 -04:00
|
|
|
response_type: 'code',
|
|
|
|
state: 'my_state',
|
|
|
|
scope: 'read_user')
|
|
|
|
end
|
|
|
|
|
|
|
|
it_behaves_like 'Secure OAuth Authorizations'
|
|
|
|
end
|
|
|
|
end
|