Skip to content

Commit 615f36e

Browse files
authored
Reduce config duplication in a test (#3540)
1 parent e563e92 commit 615f36e

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

spec/services/blacklight/search_service_spec.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
let(:repository) { Blacklight::Solr::Repository.new(blacklight_config) }
1717
let(:user_params) { {} }
1818

19-
let(:blacklight_config) { Blacklight::Configuration.new }
20-
let(:copy_of_catalog_config) { CatalogController.blacklight_config.deep_copy }
19+
let(:blacklight_config) { CatalogController.blacklight_config.deep_copy }
2120
let(:blacklight_solr) { RSolr.connect(Blacklight.connection_config.except(:adapter)) }
2221

2322
let(:all_docs_query) { '' }
@@ -50,8 +49,6 @@
5049

5150
# SPECS FOR SEARCH RESULTS FOR QUERY
5251
describe 'Search Results', :integration do
53-
let(:blacklight_config) { copy_of_catalog_config }
54-
5552
describe 'for a sample query returning results' do
5653
let(:user_params) { { q: all_docs_query } }
5754

@@ -68,7 +65,6 @@
6865
end
6966

7067
describe "for a query returning a grouped response" do
71-
let(:blacklight_config) { copy_of_catalog_config }
7268
let(:user_params) { { q: all_docs_query } }
7369

7470
before do
@@ -82,7 +78,6 @@
8278
end
8379

8480
describe "for a query returning multiple groups", :integration do
85-
let(:blacklight_config) { copy_of_catalog_config }
8681
let(:user_params) { { q: all_docs_query } }
8782

8883
before do
@@ -140,7 +135,6 @@
140135

141136
# SPECS FOR SEARCH RESULTS FOR FACETS
142137
describe 'Facets in Search Results for All Docs Query', :integration do
143-
let(:blacklight_config) { copy_of_catalog_config }
144138
let(:user_params) { { q: all_docs_query } }
145139

146140
before do
@@ -185,7 +179,6 @@
185179

186180
# SPECS FOR SEARCH RESULTS FOR PAGING
187181
describe 'Paging', :integration do
188-
let(:blacklight_config) { copy_of_catalog_config }
189182
let(:user_params) { { q: all_docs_query } }
190183

191184
it 'starts with first results by default' do

0 commit comments

Comments
 (0)