Skip to content

Commit

Permalink
[#4303] remove commented code
Browse files Browse the repository at this point in the history
remove comments that are not useful
  • Loading branch information
christinach committed Sep 13, 2024
1 parent bc8c773 commit d818e52
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 40 deletions.
1 change: 0 additions & 1 deletion spec/factories/requests/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
initialize_with { new(system_id:, patron:, mfhd: mfhd_id) }
end

## I think this item is no longer charged
factory :request_with_items_charged, class: 'Requests::Form' do
system_id { '9913891213506421' }
mfhd_id { '22739043950006421' }
Expand Down
13 changes: 0 additions & 13 deletions spec/features/requests/form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -894,18 +894,6 @@
expect(page).to have_content 'Available for In Library Use'
expect(page).to have_content('Pick-up location: Marquand Library at Firestone')
expect(page).to have_content 'ReCAP N5230.M62 R39 2014'
## This still fails 1/23/2024 - Kevin
# expect { click_button 'Request this Item' }.to change { ActionMailer::Base.deliveries.count }.by(1)
# expect(a_request(:post, scsb_url)).to have_been_made
# Fails on this line
# expect(page).to have_content "Request submitted to ReCAP, our offsite storage facility"
# confirm_email = ActionMailer::Base.deliveries.last
# expect(confirm_email.subject).to eq("Patron Initiated Catalog Request Confirmation")
# expect(confirm_email.html_part.body.to_s).not_to have_content("translation missing")
# expect(confirm_email.text_part.body.to_s).not_to have_content("translation missing")
# expect(confirm_email.html_part.body.to_s).to have_content(" Your request to pick this item up has been received. We will process the requests as soon as possible")
# expect(confirm_email.html_part.body.to_s).to have_content("Chong wen men shang shui ya men xian xing shui ze")
# expect(confirm_email.html_part.body.to_s).not_to have_content("Remain only in the designated pick-up area")
end

it "Allows On Order Princeton ReCAP Items to be Requested" do
Expand Down Expand Up @@ -966,7 +954,6 @@
end

describe 'Request a temp holding item' do
## TODO should stub availability for this scenario as a temp item is likely to go stale were we to refresh cassette data
before do
stub_illiad_patron
stub_alma_hold_success('99105816503506421', '22514405160006421', '23514405150006421', '960594184')
Expand Down
5 changes: 1 addition & 4 deletions spec/helpers/catalog_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@
end
end
end
# def render_top_field?(document, field_name)
# !should_render_show_field?(document) && document[field_name].present? &&
# field_name != 'holdings_1display'
# end

describe '#render_top_field?' do
let(:field_name) { 'top_field' }
let(:other_field_name) { 'other_field' }
Expand Down
3 changes: 0 additions & 3 deletions spec/helpers/formats_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
end
end

# blacklight_config.view_config(document_index_view_type).display_type_field]
describe CatalogHelper do
# let(:blacklight_config) do
# end
it '#render_document_class includes only first format' do
allow(helper).to receive(:document_types).and_return(format)
document_class = helper.render_document_class(document)
Expand Down
3 changes: 1 addition & 2 deletions spec/helpers/holding_block_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@
it 'matches the expected result' do
expect(search_result).to eq(expected_result)
end
# For most locations a map icon is displayed to help patrons if they want to fetch the item.
it 'includes the find it icon' do
it 'includes the find it map icon' do
search_result = helper.holding_block_search(SolrDocument.new(document_with_find_it_link))
# The icon is displayed based on the presence of data-map-location
expect(search_result).to include "data-map-location"
Expand Down
7 changes: 1 addition & 6 deletions spec/models/requests/form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@
it "provides a list of the default pick-up locations" do
expect(request_with_on_order.default_pick_ups).to be_truthy
expect(request_with_on_order.default_pick_ups).to be_an(Array)
# test that it is an array of hashes
expect(request_with_on_order.default_pick_ups.size).to be > 1
expect(request_with_on_order.default_pick_ups.include?(firestone_circ)).to be_truthy
end
Expand All @@ -386,9 +385,6 @@
end
end

## Add context for Visuals when available
## Add context for EAD when available
# http://localhost:4000/requests/2002206?mfhd=2281830
context "When passed a mfhd with missing items" do
let(:params) do
{
Expand Down Expand Up @@ -593,7 +589,7 @@
end
end
end
# 495501

context 'When passed a holding with a null item record' do
let(:params) do
{
Expand All @@ -610,7 +606,6 @@
end
end

# 4815239
context 'When passed a non-enumerated holdings with at least one loanable item' do
let(:params) do
{
Expand Down
11 changes: 0 additions & 11 deletions spec/models/requests/requestable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@
describe '#aeon_openurl' do
let(:aeon_ctx) { requestable.aeon_openurl(request.ctx) }

## no idea why these two don't match
it 'includes basic metadata' do
expect(aeon_ctx).to include('ctx_id=&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rft.genre=unknown&rft.title=Beethoven%27s+andante+cantabile+aus+dem+Trio+op.+97%2C+fu%CC%88r+orchester&rft.creator=Beethoven%2C+Ludwig+van&rft.aucorp=Leipzig%3A+Kahnt&rft.pub=Leipzig%3A+Kahnt&rft.format=musical+score&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Aunknown&rft_id=https%3A%2F%2Fcatalog.princeton.edu%2Fcatalog%2F9925358453506421&rft_id=info%3Aoclcnum%2F25615303&rfr_id=info%3Asid%2Fcatalog.princeton.edu%3Agenerator&CallNumber=M1004.L6+B3&ItemInfo1=Reading+Room+Access+Only&Location=rare%24ex&ReferenceNumber=9925358453506421&Site=RBSC')
end
Expand Down Expand Up @@ -738,7 +737,6 @@
stub_scsb_availability(bib_id: "9999998003506421", institution_id: "PUL", barcode: '32101099186403')
end

# TODO: Activate test when campus has re-opened
it "has recap request service available" do
expect(requestable.services.include?('recap')).to be true
end
Expand All @@ -756,15 +754,6 @@
end
end

# let(:request_paging) { FactoryBot.build(:request_paging_available_barcode_patron) }
# let(:requestable_paging) { request_paging.requestable.first }

# describe '#paging requestable' do
# it "should have the Paging request service available" do
# expect(requestable_paging.services.include?('paging')).to be true
# end
# end

let(:request_charged) { FactoryBot.build(:request_with_items_charged_barcode_patron) }
let(:requestable_holding) { request_charged.requestable.select { |r| r.holding.mfhd_id == '22739043950006421' } }
let(:requestable_charged) { requestable_holding.first }
Expand Down

0 comments on commit d818e52

Please sign in to comment.