Skip to content

Commit 1098fb7

Browse files
committed
Use SearchBuilder in AdvancedSearchFormComponent spec
This is more like how a Solr::Response is constructed in production
1 parent de5ddbb commit 1098fb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/components/blacklight/advanced_search_form_component_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
RSpec.describe Blacklight::AdvancedSearchFormComponent, type: :component do
66
let(:component) { described_class.new(url: '/whatever', response: response, params: params) }
7-
let(:response) { Blacklight::Solr::Response.new({ facet_counts: { facet_fields: { format: { 'Book' => 10, 'CD' => 5 } } } }.with_indifferent_access, {}) }
7+
let(:response) { Blacklight::Solr::Response.new({ facet_counts: { facet_fields: { format: { 'Book' => 10, 'CD' => 5 } } } }.with_indifferent_access, search_builder) }
8+
let(:search_builder) do
9+
Blacklight::SearchBuilder.new(view_context)
10+
end
811
let(:params) { {} }
912

1013
let(:view_context) { vc_test_controller.view_context }

0 commit comments

Comments
 (0)