Skip to content

Commit

Permalink
Merge pull request #3395 from projectblacklight/search-header
Browse files Browse the repository at this point in the history
Remove search_header partial
  • Loading branch information
jcoyne authored Nov 4, 2024
2 parents 472667c + b0f550b commit bf822b1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
1 change: 0 additions & 1 deletion app/views/catalog/_search_header.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/catalog/_search_results.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<%= render (blacklight_config&.view_config(document_index_view_type)&.constraints_component || Blacklight::ConstraintsComponent).new(search_state: search_state) %>
<% end %>

<%= render 'search_header' %>
<%= render blacklight_config.view_config(document_index_view_type).search_header_component.new %>

<h2 class="visually-hidden"><%= t('blacklight.search.search_results') %></h2>

Expand Down
14 changes: 0 additions & 14 deletions spec/views/catalog/_search_header.erb_spec.rb

This file was deleted.

9 changes: 6 additions & 3 deletions spec/views/catalog/index.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@
describe "with search parameters" do
before do
stub_template "catalog/_results_pagination.html.erb" => ""
stub_template "catalog/_search_header.html.erb" => "header_content"
allow(view).to receive_messages(has_search_parameters?: true, blacklight_config: Blacklight::Configuration.new)
@response = instance_double(Blacklight::Solr::Response, empty?: true, total: 11, start: 1, limit_value: 10)
allow(controller).to receive_messages(blacklight_config: Blacklight::Configuration.new)

@response = response
end

let(:response) { Blacklight::Solr::Response.new({ response: { numFound: 30 } }, start: 10, rows: 10) }

it "renders the search_header partial" do
render
expect(rendered).to match /header_content/
expect(rendered).to match /sortAndPerPage/
end
end
end

0 comments on commit bf822b1

Please sign in to comment.