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
Remove references to the Storage Show Page
Marcello Rocha6a9ed3939eb2
diff --git a/app/controllers/oauth_clients_controller.rb b/app/controllers/oauth_clients_controller.rbindex b4edbe69364..9a44a805efc 100644--- a/app/controllers/oauth_clients_controller.rb+++ b/app/controllers/oauth_clients_controller.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) 2012-2023 the OpenProject GmbH@@ -61,7 +63,7 @@ class OAuthClientsController < ApplicationControllerredirect_user_or_admin(@redirect_uri) do# If the current user is an admin, we send her directly to the# settings that she needs to edit.- redirect_to admin_settings_storage_path(@oauth_client.integration)+ redirect_to edit_admin_settings_storage_path(@oauth_client.integration)endendend@@ -96,7 +98,7 @@ class OAuthClientsController < ApplicationControllerredirect_user_or_admin(get_redirect_uri) do# If the current user is an admin, we send her directly to the# settings that she needs to edit/fix.- redirect_to admin_settings_storage_path(@oauth_client.integration)+ redirect_to edit_admin_settings_storage_path(@oauth_client.integration)endendend@@ -118,7 +120,7 @@ class OAuthClientsController < ApplicationControllerredirect_user_or_admin(nil) do# Guide the user to the settings that she needs to edit/fix.- redirect_to admin_settings_storage_path(@oauth_client.integration)+ redirect_to edit_admin_settings_storage_path(@oauth_client.integration)endendenddiff --git a/modules/storages/app/components/storages/admin/row_component.rb b/modules/storages/app/components/storages/admin/row_component.rbindex ef561ae2bda..d626d10890a 100644--- a/modules/storages/app/components/storages/admin/row_component.rb+++ b/modules/storages/app/components/storages/admin/row_component.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) 2012-2023 the OpenProject GmbH@@ -34,16 +36,9 @@ module Storages::Adminrowend- delegate :created_at, to: :storage-- def name- link_to storage.name, admin_settings_storage_path(storage)- end-# Delegate delegates the execution of certain methods to :storage.# https://www.rubydoc.info/gems/activesupport/Module:delegate- delegate :host, to: :storage- delegate :provider_type, to: :storage+ delegate :created_at, :name, :host, :provider_type, to: :storagedef creatoricon = helpers.avatar storage.creator, size: :minidiff --git a/modules/storages/app/controllers/storages/admin/automatically_managed_project_folders_controller.rb b/modules/storages/app/controllers/storages/admin/automatically_managed_project_folders_controller.rbindex 953168cdbc2..1964038f6a8 100644--- a/modules/storages/app/controllers/storages/admin/automatically_managed_project_folders_controller.rb+++ b/modules/storages/app/controllers/storages/admin/automatically_managed_project_folders_controller.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) 2012-2023 the OpenProject GmbH@@ -82,7 +84,7 @@ class Storages::Admin::AutomaticallyManagedProjectFoldersController < Applicatioif service_result.success?flash[:notice] = I18n.t(:notice_successful_update)- redirect_to admin_settings_storage_path(@storage)+ redirect_to edit_admin_settings_storage_path(@storage)else@errors = service_result.errorsrender '/storages/admin/storages/automatically_managed_project_folders/edit'diff --git a/modules/storages/app/controllers/storages/admin/oauth_clients_controller.rb b/modules/storages/app/controllers/storages/admin/oauth_clients_controller.rbindex 8384b25e66b..d4a823d0011 100644--- a/modules/storages/app/controllers/storages/admin/oauth_clients_controller.rb+++ b/modules/storages/app/controllers/storages/admin/oauth_clients_controller.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) 2012-2023 the OpenProject GmbH@@ -64,7 +66,7 @@ class Storages::Admin::OAuthClientsController < ApplicationControllerif @storage.automatic_management_unspecified?redirect_to new_admin_settings_storage_automatically_managed_project_folders_path(@storage)else- redirect_to admin_settings_storage_path(@storage)+ redirect_to edit_admin_settings_storage_path(@storage)endelse@errors = service_result.errorsdiff --git a/modules/storages/app/controllers/storages/admin/storages_controller.rb b/modules/storages/app/controllers/storages/admin/storages_controller.rbindex e141e16588b..199be318528 100644--- a/modules/storages/app/controllers/storages/admin/storages_controller.rb+++ b/modules/storages/app/controllers/storages/admin/storages_controller.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) 2012-2023 the OpenProject GmbH@@ -52,10 +54,6 @@ class Storages::Admin::StoragesController < ApplicationController@storages = Storages::Storage.allend- # Show page with details of one Storage object.- # Called by: Global app/config/routes.rb to serve Web page- def show; end-# Show the admin page to create a new Storage object.# Sets the attributes provider_type and name as default values and then# renders the new page (allowing the user to overwrite these values and to@@ -109,7 +107,7 @@ class Storages::Admin::StoragesController < ApplicationControllerif service_result.success?flash[:notice] = I18n.t(:notice_successful_update)- redirect_to admin_settings_storage_path(@object)+ redirect_to edit_admin_settings_storage_path(@object)else@errors = service_result.errorsrender :editdiff --git a/modules/storages/app/views/storages/admin/storages/automatically_managed_project_folders/edit.html.erb b/modules/storages/app/views/storages/admin/storages/automatically_managed_project_folders/edit.html.erbindex 29f8232a2b7..3872626d2a1 100644--- a/modules/storages/app/views/storages/admin/storages/automatically_managed_project_folders/edit.html.erb+++ b/modules/storages/app/views/storages/admin/storages/automatically_managed_project_folders/edit.html.erb@@ -29,7 +29,7 @@ See COPYRIGHT and LICENSE files for more details.<% html_title t(:label_administration), t("project_module_storages"), @storage.name, t("storages.page_titles.managed_project_folders.title") %><% local_assigns[:additional_breadcrumb] = [- link_to(@storage.name, admin_settings_storage_path(@storage)),+ link_to(@storage.name, edit_admin_settings_storage_path(@storage)),t("storages.label_managed_project_folders_breadcrumb")] %><%= toolbar title: t("storages.page_titles.managed_project_folders.title"),@@ -98,7 +98,7 @@ See COPYRIGHT and LICENSE files for more details.<%= styled_button_tag t("storages.buttons.save"), class: "-highlight -with-icon icon-checkmark" %><% end %>- <%= link_to admin_settings_storage_path(@storage), class: 'button' do %>+ <%= link_to edit_admin_settings_storage_path(@storage), class: 'button' do %><%= spot_icon('cancel') %><%= content_tag :span, t(:button_cancel) %><% end %>diff --git a/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erb b/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erbindex e07ad4ee8d1..b7300bce212 100644--- a/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erb+++ b/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erb@@ -1,7 +1,7 @@<!-- Standard Ruby view, please see the controller for comments --><% html_title t(:label_administration), t("project_module_storages"), @storage.name, "#{t("storages.provider_types.#{@storage.short_provider_type}.name")} #{t("storages.label_oauth_client_details")}" %><% local_assigns[:additional_breadcrumb] = [- link_to(@storage.name, admin_settings_storage_path(@storage)),+ link_to(@storage.name, edit_admin_settings_storage_path(@storage)),t("storages.label_oauth_breadcrumb.#{@storage.short_provider_type}")] %><%= toolbar title: "#{t("storages.provider_types.#{@storage.short_provider_type}.name")} #{t("storages.label_oauth_client_details")}" %>diff --git a/modules/storages/app/views/storages/admin/storages/show.html.erb b/modules/storages/app/views/storages/admin/storages/show.html.erbdeleted file mode 100644index 2c060f17ed3..00000000000--- a/modules/storages/app/views/storages/admin/storages/show.html.erb+++ /dev/null@@ -1,121 +0,0 @@-<%#-- copyright-OpenProject is an open source project management software.-Copyright (C) 2012-2023 the OpenProject GmbH--This program is free software; you can redistribute it and/or-modify it under the terms of the GNU General Public License version 3.--OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-Copyright (C) 2006-2013 Jean-Philippe Lang-Copyright (C) 2010-2013 the ChiliProject Team--This program is free software; you can redistribute it and/or-modify it under the terms of the GNU General Public License-as published by the Free Software Foundation; either version 2-of the License, or (at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program; if not, write to the Free Software-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.--See COPYRIGHT and LICENSE files for more details.--++#%>-<!-- Standard Ruby view, please see the controller for comments -->-<% html_title t(:label_administration), t('project_module_storages'), t(@object.name) -%>-<% local_assigns[:additional_breadcrumb] = @object.name %>--<%= toolbar title: @object.name,- title_class: 'no-padding-bottom' do %>- <li class="toolbar-item">- <%= link_to edit_admin_settings_storage_path(@object),- class: 'button' do %>- <%= op_icon('button--icon icon-edit') %>- <span class="button--text"><%= t(:button_edit) %></span>- <% end %>- </li>- <li class="toolbar-item">- <%= link_to admin_settings_storage_path(@object),- method: :delete,- data: { confirm: I18n.t('storages.delete_warning.storage') },- class: 'button -danger' do %>- <%= op_icon('button--icon icon-delete') %>- <span class="button--text"><%= t(:button_delete) %></span>- <% end %>- </li>-<% end %>--<% if @object.projects.empty? %>- <div class="op-toast -warning -with-bottom-spacing">- <div class="op-toast--content">- <p>- <%= t('repositories.storage.show_warning_details') %>- </p>- </div>- </div>-<% end %>--<%= render(AttributeGroups::AttributeGroupComponent.new) do |component| %>- <% component.with_header(title: t(:label_general)) %>-- <% component.with_attributes([- { key: t(:'storages.label_name'), value: @object.name },- { key: t(:'storages.label_provider_type'), value: t(:"storages.provider_types.#{@object.short_provider_type}.name") },- { key: t(:'storages.label_host'), value: link_to(@object.host, @object.host) },- { key: t(:'storages.label_creator'), value: @object.creator.name },- { key: Storages::ProjectStorage.human_attribute_name(:created_at), value: format_time(@object.created_at) }- ]) %>-<% end %>--<% if @object.oauth_application %>- <%= render(AttributeGroups::AttributeGroupComponent.new) do |component| %>- <% component.with_header(title: "OpenProject #{t(:'storages.label_oauth_application_details')}") %>-- <% component.with_attributes([- { key: "OpenProject #{Storages::Admin::LABEL_OAUTH_CLIENT_ID}", value: @object.oauth_application.uid },- { key: "OpenProject #{Storages::Admin::LABEL_OAUTH_CLIENT_SECRET}", value: "●●●●●●●●●●●●●●●●" },- ]) %>- <% end %>-<% end %>--<%= render(AttributeGroups::AttributeGroupComponent.new) do |component| %>- <% component.with_header(title: "#{t("storages.provider_types.#{@object.short_provider_type}.name")} #{t(:'storages.label_oauth_client_details')}") %>-- <% if @object.oauth_client %>- <% component.with_attributes([- { key: "#{t("storages.provider_types.#{@object.short_provider_type}.name")} #{Storages::Admin::LABEL_OAUTH_CLIENT_ID}",- value: @object.oauth_client.client_id },- { key: "#{t("storages.provider_types.#{@object.short_provider_type}.name")} #{Storages::Admin::LABEL_OAUTH_CLIENT_SECRET}",- value: short_secret(@object.oauth_client.client_secret) },- ]) %>- <% else %>- <% t(:'storages.oauth_client_details_missing') %>- <% end %>-<% end %>---<%= render(AttributeGroups::AttributeGroupComponent.new) do |component| %>- <% component.with_header(title: t("storages.page_titles.managed_project_folders.title")) %>-- <% if @object.automatic_management_unspecified? %>- <%= t("storages.automatically_managed_project_folder_missing") %>- <% else %>- <% component.with_attribute(- key: t(:"storages.label_managed_project_folders.automatically_managed_folders"),- value: @object.automatically_managed? ? t(:"storages.label_active") : t(:"storages.label_inactive")- ) %>-- <% if @object.automatically_managed? %>- <% component.with_attribute(- key: t(:"storages.label_managed_project_folders.application_password"),- value: "●●●●●●●●●●●●●●●●"- ) %>- <% end %>- <% end %>-<% end %>-diff --git a/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb b/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erbindex 72dd34bda7b..487b9e52c6e 100644--- a/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb+++ b/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb@@ -1,7 +1,7 @@<!-- Standard Ruby view, please see the controller for comments --><% html_title t(:label_administration), t("project_module_storages"), @object.name, "#{t("storages.provider_types.#{@object.short_provider_type}.name")} #{t("storages.label_oauth_application_details")}" %><% local_assigns[:additional_breadcrumb] = [- link_to(@object.name, admin_settings_storage_path(@object)),+ link_to(@object.name, edit_admin_settings_storage_path(@object)),t("storages.label_oauth_breadcrumb.openproject")] %><%= toolbar title: "OpenProject #{t("storages.label_oauth_application_details")}" %>@@ -84,7 +84,7 @@</fieldset><% if @object.oauth_client %>- <%= link_to t("storages.buttons.done_continue_setup"), admin_settings_storage_path(@object), class: "-highlight -with-icon icon-checkmark button" %>+ <%= link_to t("storages.buttons.done_continue_setup"), edit_admin_settings_storage_path(@object), class: "-highlight -with-icon icon-checkmark button" %><% else %><%= link_to t("storages.buttons.done_continue_setup"), new_admin_settings_storage_oauth_client_path(@object), class: "-highlight -with-icon icon-checkmark button" %><% end %>diff --git a/modules/storages/app/views/storages/project_settings/project_storage_members/index.html.erb b/modules/storages/app/views/storages/project_settings/project_storage_members/index.html.erbindex 06c5d41e50b..bc1cb59587c 100644--- a/modules/storages/app/views/storages/project_settings/project_storage_members/index.html.erb+++ b/modules/storages/app/views/storages/project_settings/project_storage_members/index.html.erb@@ -40,7 +40,7 @@ See COPYRIGHT and LICENSE files for more details.<%= content_tag(:p,t("storages.page_titles.project_storage_members.subtitle",- storage_name_link: link_to(@storage.name, admin_settings_storage_path(@storage))).html_safe+ storage_name_link: link_to(@storage.name, edit_admin_settings_storage_path(@storage))).html_safe) %><%= render(::Storages::ProjectStorages::Members::TableComponent.new(rows: @memberships, storage: @storage)) %>diff --git a/modules/storages/config/routes.rb b/modules/storages/config/routes.rbindex 4d1640287c2..b7d9c073e19 100644--- a/modules/storages/config/routes.rb+++ b/modules/storages/config/routes.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) 2012-2023 the OpenProject GmbH@@ -29,7 +31,7 @@OpenProject::Application.routes.draw donamespace :admin donamespace :settings do- resources :storages, controller: '/storages/admin/storages' do+ resources :storages, controller: '/storages/admin/storages', except: [:show] doresource :oauth_client, controller: '/storages/admin/oauth_clients', only: %i[new create]resource :automatically_managed_project_folders, controller: '/storages/admin/automatically_managed_project_folders',only: %i[new edit update]diff --git a/modules/storages/spec/features/admin_storages_spec.rb b/modules/storages/spec/features/admin_storages_spec.rbindex c41238f4ccd..85e5720ec41 100644--- a/modules/storages/spec/features/admin_storages_spec.rb+++ b/modules/storages/spec/features/admin_storages_spec.rb@@ -31,9 +31,7 @@ require_relative '../spec_helper'RSpec.describe 'Admin storages', :storage_server_helpers, js: true dolet(:admin) { create(:admin) }- before do- login_as admin- end+ before { login_as admin }it 'creates, edits and deletes storages', webmock: true dovisit admin_settings_storages_path@@ -136,20 +134,7 @@ RSpec.describe 'Admin storages', :storage_server_helpers, js: true doexpect(page).to have_text("●●●●●●●●●●●●●●●●")######### Step 4: End Automatically managed project folders #########- # Show details of a storage- created_storage = Storages::Storage.find_by(name: 'NC 1')- expect(page).to have_title("Nc 1")- expect(page.find('.title-container')).to have_text('NC 1')- expect(page).to have_text(admin.name)- expect(page).to have_text('https://example.com')- expect(page).to have_text(created_storage.created_at.localtime.strftime("%m/%d/%Y %I:%M %p"))- # Check for client_id of nextcloud client and oauth application- expect(page).to have_text(oauth_app_client_id)- expect(page).to have_text("0123456789")- # Check for the automatically managed project folders settings-# Edit storage again- page.find('.button--icon.icon-edit').clickexpect(page).to have_title("Edit: NC 1")expect(page).not_to have_select("storages_storage[provider_type]")expect(page).to have_text("NC 1")@@ -175,7 +160,6 @@ RSpec.describe 'Admin storages', :storage_server_helpers, js: true do# Test the behavior of a failed host validation with code 400 (Bad Request)# simulating server not running Nextcloud- page.find('.button--icon.icon-edit').clickmock_server_capabilities_response("https://other.example.com", response_code: '400')page.find_by_id('storages_storage_name').set("Other NC")page.find_by_id('storages_storage_host').set("https://other.example.com")@@ -204,16 +188,8 @@ RSpec.describe 'Admin storages', :storage_server_helpers, js: true dopage.find_by_id('storages_storage_name').set("Other NC")page.find('button[type=submit]', text: "Save").click- created_storage = Storages::Storage.find_by(name: 'Other NC')- expect(page).to have_title("Other Nc")- expect(page.find('.title-container')).to have_text('Other NC')- expect(page).to have_text(admin.name)- expect(page).to have_text('https://example.com')- expect(page).to have_text(created_storage.created_at.localtime.strftime("%m/%d/%Y %I:%M %p"))-######### Begin Edit Automatically managed project folders #########- page.find('.button--icon.icon-edit').click-+ ## Confirm update of host URL with subpath renders correctly Nextcloud/Administration linkmock_server_capabilities_response("https://example.com/with/subpath")mock_server_config_check_response("https://example.com/with/subpath")@@ -221,9 +197,8 @@ RSpec.describe 'Admin storages', :storage_server_helpers, js: true dopage.click_button('Save')# Check for updated host URL- expect(page).to have_text("https://example.com/with/subpath")+ expect(page.find_by_id('storages_storage_host').value).to eq("https://example.com/with/subpath")- page.find('.button--icon.icon-edit').clickpage.find('a', text: 'Edit automatically managed project folders').clickexpect(page).to have_title("Automatically managed project folders")@@ -232,9 +207,12 @@ RSpec.describe 'Admin storages', :storage_server_helpers, js: true doexpect(automatically_managed_switch).to be_checkedexpect(application_password_input.value).to be_emptyexpect(application_password_input['placeholder']).to eq("●●●●●●●●●●●●●●●●")- expect(page).to have_link(text: 'Nextcloud Administration / OpenProject', href: 'https://example.com/with/subpath/settings/admin/openproject')+ expect(page).to have_link(+ text: 'Nextcloud Administration / OpenProject',+ href: 'https://example.com/with/subpath/settings/admin/openproject'+ )- # Clicking submit without inputing new application password should show an error+ # Clicking submit without inputting new application password should show an errorpage.click_button('Save')# Check that we're still on the same pageexpect(page).to have_title("Automatically managed project folders")diff --git a/modules/storages/spec/features/create_file_links_spec.rb b/modules/storages/spec/features/create_file_links_spec.rbindex 5f100936146..bd69b58b067 100644--- a/modules/storages/spec/features/create_file_links_spec.rb+++ b/modules/storages/spec/features/create_file_links_spec.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) 2012-2023 the OpenProject GmbH@@ -35,7 +37,7 @@ RSpec.describe 'Managing file links in work package', js: true, webmock: true dolet(:work_package) { create(:work_package, project:, description: 'Initial description') }let(:oauth_application) { create(:oauth_application) }- let(:storage) { create(:storage, oauth_application:) }+ let(:storage) { create(:nextcloud_storage, oauth_application:) }let(:oauth_client) { create(:oauth_client, integration: storage) }let(:oauth_client_token) { create(:oauth_client_token, oauth_client:, user: current_user) }let(:project_storage) { create(:project_storage, project:, storage:, project_folder_id: nil, project_folder_mode: 'inactive') }@@ -62,7 +64,7 @@ RSpec.describe 'Managing file links in work package', js: true, webmock: true dostub_request(:get, "#{storage.host}/ocs/v1.php/cloud/user").with(headers: {- 'Authorization' => 'Bearer 1234567890-1',+ 'Authorization' => "Bearer #{oauth_client_token.access_token}",'Ocs-Apirequest' => 'true','Accept' => "application/json"}diff --git a/modules/storages/spec/services/storages/file_links/file_link_sync_service_spec.rb b/modules/storages/spec/services/storages/file_links/file_link_sync_service_spec.rbindex b42b9653e53..9d5a28132de 100644--- a/modules/storages/spec/services/storages/file_links/file_link_sync_service_spec.rb+++ b/modules/storages/spec/services/storages/file_links/file_link_sync_service_spec.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) 2012-2023 the OpenProject GmbH@@ -27,7 +29,6 @@#++require 'spec_helper'-require 'webmock/rspec'RSpec.describe Storages::FileLinkSyncService, type: :model dolet(:user) { create(:user) }diff --git a/spec/requests/oauth_clients/callback_flow_spec.rb b/spec/requests/oauth_clients/callback_flow_spec.rbindex 1a664a11389..751fac3aaf2 100644--- a/spec/requests/oauth_clients/callback_flow_spec.rb+++ b/spec/requests/oauth_clients/callback_flow_spec.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) 2012-2023 the OpenProject GmbH@@ -75,21 +77,21 @@ RSpec.describe 'OAuthClient callback endpoint' doshared_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.status).to eq 302+ expect(response).to have_http_status :foundexpect(response.location).to eq redirect_uriendendshared_examples 'with errors, being an admin' doit 'redirects to admin settings for the storage' do- expect(response.status).to eq 302- expect(URI(response.location).path).to eq admin_settings_storage_path(oauth_client.integration)+ expect(response).to have_http_status :found+ 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.status).to eq 302+ expect(response).to have_http_status :foundexpect(URI(response.location).path).to eq API::V3::Utilities::PathHelper::ApiV3Path::root_pathendend@@ -105,7 +107,7 @@ RSpec.describe 'OAuthClient callback endpoint' doit '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.status).to eq 302+ expect(response).to have_http_status :foundexpect(response.location).to eq redirect_uriexpect(OAuthClientToken.count).to eq 1expect(OAuthClientToken.last.access_token).to eq 'xyzaccesstoken'