Skip to content

Commit

Permalink
NOP-52 Test that Ursus renders a mostly blank Solr document (#1188)
Browse files Browse the repository at this point in the history
* feat: NOP-52 Test that Ursus renders a mostly blank Solr document

* empty line
  • Loading branch information
kethlinmil authored Dec 6, 2024
1 parent 69d4b5d commit 438e829
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions spec/controllers/catalog_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,21 @@
it { expect(search_fields).to contain_exactly(*expected_search_fields) }
end

xdescribe "show action" do
describe "show action" do
render_views

before do
# allow(controller).to receive(:search_service).and_return(search_service)
# expect(search_service).to receive(:fetch).and_return([mock_response, mock_document])
allow(controller).to receive(:enforce_show_permissions).and_return(true)
allow(controller).to receive(:search_service).and_return(search_service)
allow(search_service).to receive(:fetch).and_return([mock_response, mock_document])
end
# let(:doc_id) { '2007020969' }
# let(:mock_response) { instance_double(Blacklight::Solr::Response) }
# let(:mock_document) { instance_double(SolrDocument, export_formats: {}) }
# let(:search_service) { instance_double(Blacklight::SearchService) }

it "has collection count on Collection Item record page" do
# get :show, params: { id: doc_id }
# expect(assigns[:document]).not_to be_nil
let(:doc_id) { 'ark:/123/abc' }
let(:mock_response) { instance_double(Blacklight::Solr::Response) }
let(:mock_document) { instance_double(SolrDocument, export_formats: {}) }
let(:search_service) { instance_double(Blacklight::SearchService) }

it "Renders a blank SolrDocument (meaning missing fields don\'t cause errors)" do
get :show, params: { id: doc_id }
end
end

Expand Down

0 comments on commit 438e829

Please sign in to comment.