diff --git a/admin/app/controllers/solidus_admin/auth.rb b/admin/app/controllers/solidus_admin/auth.rb index ccb8c04bc46..54b1ff7fbec 100644 --- a/admin/app/controllers/solidus_admin/auth.rb +++ b/admin/app/controllers/solidus_admin/auth.rb @@ -22,7 +22,7 @@ def current_solidus_admin_user end def solidus_admin_logout_path - send SolidusAdmin::Config.logout_link_path + SolidusAdmin::Config.logout_link_path end def solidus_admin_logout_method diff --git a/admin/lib/solidus_admin/configuration.rb b/admin/lib/solidus_admin/configuration.rb index aa4fd6b6141..785f8d204dd 100644 --- a/admin/lib/solidus_admin/configuration.rb +++ b/admin/lib/solidus_admin/configuration.rb @@ -103,7 +103,7 @@ def main_nav preference :current_user_method, :string, default: :spree_current_user # The path used to logout the user in the admin interface. - preference :logout_link_path, :string, default: :admin_logout_path + preference :logout_link_path, :string, default: '/admin/logout' # The HTTP method used to logout the user in the admin interface. preference :logout_link_method, :string, default: :delete diff --git a/admin/lib/solidus_admin/preview.rb b/admin/lib/solidus_admin/preview.rb index 331e36452dd..913914a33d5 100644 --- a/admin/lib/solidus_admin/preview.rb +++ b/admin/lib/solidus_admin/preview.rb @@ -43,10 +43,6 @@ def authenticate_solidus_backend_user! # noop end - def admin_logout_path - "/logout" - end - def current_component @current_component ||= begin # Lookbook sets the @preview instance variable with a PreviewEntity instance, while ViewComponent uses the preview class. diff --git a/admin/spec/components/solidus_admin/sidebar/component_spec.rb b/admin/spec/components/solidus_admin/sidebar/component_spec.rb index 856df498747..94087c12fd2 100644 --- a/admin/spec/components/solidus_admin/sidebar/component_spec.rb +++ b/admin/spec/components/solidus_admin/sidebar/component_spec.rb @@ -3,12 +3,7 @@ require "spec_helper" RSpec.describe SolidusAdmin::Sidebar::Component, type: :component do - before do - allow(vc_test_controller).to receive(:spree_current_user).and_return(build(:user)) - without_partial_double_verification do - allow(vc_test_controller.spree).to receive(:admin_logout_path).and_return('/logout') - end - end + before { allow(vc_test_controller).to receive(:spree_current_user).and_return(build(:user)) } it "renders the overview preview" do render_preview(:overview)