diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 20b434caa..7b5f8273f 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -6,7 +6,6 @@ class CatalogController < ApplicationController include Blacklight::Marc::Catalog include BlacklightRangeLimit::ControllerOverride include Orangelight::Catalog - include Orangelight::Stackmap include Orangelight::ExcessivePaging include BlacklightHelper diff --git a/app/controllers/concerns/orangelight/stackmap.rb b/app/controllers/concerns/orangelight/stackmap.rb deleted file mode 100644 index 4ea38e7ef..000000000 --- a/app/controllers/concerns/orangelight/stackmap.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -module Orangelight - module Stackmap - extend ActiveSupport::Concern - - def stackmap - @document = search_service_compatibility_wrapper.fetch params[:id] - stackmap_service = ::StackmapService::Url.new(document: @document, - loc: params[:loc], cn: params[:cn]) - @url = stackmap_service.url - @call_number = stackmap_service.preferred_callno - @location_label = stackmap_service.location_label - render layout: false if request.xhr? - end - end -end diff --git a/spec/controllers/orangelight/stackmap_spec.rb b/spec/controllers/orangelight/stackmap_spec.rb deleted file mode 100644 index 8dd486ab3..000000000 --- a/spec/controllers/orangelight/stackmap_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -RSpec.describe CatalogController do - describe 'stackmap action' do - before { stub_holding_locations } - it 'assigns the expected instance variables with provided call number' do - get :stackmap, params: { id: 9_992_220_243_506_421, loc: 'firestone$stacks', cn: 'Call number' } - expect(assigns(:location_label)).to eq('Stacks') - expect(assigns(:call_number)).to eq('Call number') - end - - it 'assigns the first document call number when cn param not provided' do - get :stackmap, params: { id: 9_992_220_243_506_421, loc: 'firestone$stacks' } - expect(assigns(:call_number)).to eq('PS3566.I428 A6 2015') - end - end -end