OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Revert the changes on callback flow spec
Marcello Rocha31d9680fe3f2
diff --git a/spec/requests/oauth_clients/callback_flow_spec.rb b/spec/requests/oauth_clients/callback_flow_spec.rbindex 751fac3aaf2..42a9f8a0fea 100644--- a/spec/requests/oauth_clients/callback_flow_spec.rb+++ b/spec/requests/oauth_clients/callback_flow_spec.rb@@ -75,23 +75,24 @@ RSpec.describe 'OAuthClient callback endpoint' doset_cookie "oauth_state_asdf1234=#{redirect_uri}"end+ # rubocop:disable RSpec/Rails/HaveHttpStatusshared_examples 'with errors and state param with cookie, not being admin' doit 'redirects to URI referenced in the state param and held in a cookie' do- expect(response).to have_http_status :found+ expect(response.status).to eq(302)expect(response.location).to eq redirect_uriendendshared_examples 'with errors, being an admin' doit 'redirects to admin settings for the storage' do- expect(response).to have_http_status :found+ expect(response.status).to eq(302)expect(URI(response.location).path).to eq edit_admin_settings_storage_path(oauth_client.integration)endendshared_examples 'fallback redirect' doit 'redirects to home' do- expect(response).to have_http_status :found+ expect(response.status).to eq(302)expect(URI(response.location).path).to eq API::V3::Utilities::PathHelper::ApiV3Path::root_pathendend@@ -101,13 +102,11 @@ RSpec.describe 'OAuthClient callback endpoint' dobefore douri.query = URI.encode_www_form([['code', code], ['state', state]])get uri.to_s-- subjectendit 'redirects to the URL that was referenced by the state param and held by a cookie' doexpect(rack_oauth2_client).to have_received(:authorization_code=).with(code)- expect(response).to have_http_status :found+ expect(response.status).to eq 302expect(response.location).to eq redirect_uriexpect(OAuthClientToken.count).to eq 1expect(OAuthClientToken.last.access_token).to eq 'xyzaccesstoken'@@ -182,4 +181,5 @@ RSpec.describe 'OAuthClient callback endpoint' doit_behaves_like 'fallback redirect'end+ # rubocop:enable RSpec/Rails/HaveHttpStatusend