diff --git a/lib/holdings/item.rb b/lib/holdings/item.rb index 429883e68..6cf9e36b8 100644 --- a/lib/holdings/item.rb +++ b/lib/holdings/item.rb @@ -216,11 +216,7 @@ def eresv? private def standard_or_zombie_library - if item_display[:library].blank? || %w(SUL PHYSICS).include?(item_display[:library]) - 'ZOMBIE' - else - item_display[:library] - end + (item_display[:library].presence || 'ZOMBIE') end def current_location_is_reserve_desk? diff --git a/spec/components/access_panels/at_the_library_component_spec.rb b/spec/components/access_panels/at_the_library_component_spec.rb index 7e0d723f8..446798ce2 100644 --- a/spec/components/access_panels/at_the_library_component_spec.rb +++ b/spec/components/access_panels/at_the_library_component_spec.rb @@ -347,8 +347,6 @@ document = SolrDocument.new( id: '123', item_display_struct: [ - { barcode: '123', library: 'SUL', home_location: 'STACKS', callnumber: 'ABC 123' }, - { barcode: '456', library: 'PHYSICS', home_location: 'PHYSTEMP', callnumber: 'DEF 456' }, { barcode: '789', home_location: 'ON-ORDER', current_location: 'ON-ORDER', callnumber: 'GHI 789' } ] ) @@ -359,12 +357,6 @@ # This seems to be counting request links (not sure if that was the intent) expect(page).to have_css('.panel-library-location a', count: 1) end - it "renders SUL items in the zombie library" do - expect(page).to have_css('.panel-library-location td', text: 'ABC') - end - it "renders PHYSICS items in the zombie library" do - expect(page).to have_css('.panel-library-location td', text: 'DEF') - end it "renders blank (i.e. on order) items in the zombie library" do expect(page).to have_css('.panel-library-location td', text: 'GHI') end diff --git a/spec/lib/holdings/item_spec.rb b/spec/lib/holdings/item_spec.rb index 3784ae556..2fc5a5b93 100644 --- a/spec/lib/holdings/item_spec.rb +++ b/spec/lib/holdings/item_spec.rb @@ -194,20 +194,10 @@ describe 'zombie libraries' do let(:blank) { Holdings::Item.new({ barcode: '123', library: '', home_location: 'LOCATION' }) } - let(:sul) { Holdings::Item.new({ barcode: '123', library: 'SUL', home_location: 'LOCATION' }) } - let(:physics) { Holdings::Item.new({ barcode: '123', library: 'PHYSICS', home_location: 'LOCATION' }) } it 'should view blank libraries as a zombie library' do expect(blank.library).to eq 'ZOMBIE' end - - it 'should view blank libraries as a zombie library' do - expect(sul.library).to eq 'ZOMBIE' - end - - it 'should view blank libraries as a zombie library' do - expect(physics.library).to eq 'ZOMBIE' - end end describe '#as_json' do