Skip to content

Commit

Permalink
Remove PHYSICS (not in FOLIO) and SUL (perfectly valid FOLIO library)…
Browse files Browse the repository at this point in the history
… from the zombie list
  • Loading branch information
cbeer committed Oct 9, 2023
1 parent 3b5ce0c commit 32c269d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
6 changes: 1 addition & 5 deletions lib/holdings/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
]
)
Expand All @@ -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
Expand Down
10 changes: 0 additions & 10 deletions spec/lib/holdings/item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 32c269d

Please sign in to comment.