Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PHYSICS (not in FOLIO) and SUL (perfectly valid FOLIO library) from the zombie list #3612

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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