2020-11-24 15:15:51 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe 'JIRA OAuth Provider' do
|
|
|
|
describe 'JIRA DVCS OAuth Authorization' do
|
2022-06-21 17:19:12 +05:30
|
|
|
let(:application) { create(:oauth_application, redirect_uri: oauth_jira_dvcs_callback_url, scopes: 'read_user') }
|
2020-11-24 15:15:51 +05:30
|
|
|
|
|
|
|
before do
|
|
|
|
sign_in(user)
|
|
|
|
|
2022-06-21 17:19:12 +05:30
|
|
|
visit oauth_jira_dvcs_authorize_path(client_id: application.uid,
|
2022-10-11 01:57:18 +05:30
|
|
|
redirect_uri: oauth_jira_dvcs_callback_url,
|
|
|
|
response_type: 'code',
|
|
|
|
state: 'my_state',
|
|
|
|
scope: 'read_user')
|
2020-11-24 15:15:51 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
it_behaves_like 'Secure OAuth Authorizations'
|
|
|
|
end
|
|
|
|
end
|