blacklight 8.2.2 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. checksums.yaml +4 -4
  2. data/.env +1 -1
  3. data/.github/workflows/ruby.yml +60 -62
  4. data/.rubocop.yml +229 -21
  5. data/.rubocop_todo.yml +22 -55
  6. data/Gemfile +2 -10
  7. data/README.md +2 -2
  8. data/VERSION +1 -1
  9. data/app/assets/javascripts/blacklight/blacklight.esm.js +5 -1
  10. data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
  11. data/app/assets/javascripts/blacklight/blacklight.js +5 -1
  12. data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
  13. data/app/assets/stylesheets/blacklight/_balanced_list.scss +1 -1
  14. data/app/assets/stylesheets/blacklight/_bookmark.scss +30 -0
  15. data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +0 -4
  16. data/app/assets/stylesheets/blacklight/_constraints.scss +15 -9
  17. data/app/assets/stylesheets/blacklight/_controls.scss +0 -1
  18. data/app/assets/stylesheets/blacklight/_facets.scss +33 -37
  19. data/app/assets/stylesheets/blacklight/_header.scss +2 -35
  20. data/app/assets/stylesheets/blacklight/_icons.scss +3 -2
  21. data/app/assets/stylesheets/blacklight/_layout.scss +3 -0
  22. data/app/assets/stylesheets/blacklight/_mixins.scss +6 -21
  23. data/app/assets/stylesheets/blacklight/_search_form.scss +3 -8
  24. data/app/assets/stylesheets/blacklight/_search_history.scss +5 -5
  25. data/app/assets/stylesheets/blacklight/_search_results.scss +5 -2
  26. data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +16 -10
  27. data/app/components/blacklight/advanced_search_form_component.html.erb +1 -1
  28. data/app/components/blacklight/advanced_search_form_component.rb +6 -0
  29. data/app/components/blacklight/constraint_layout_component.html.erb +2 -9
  30. data/app/components/blacklight/constraint_layout_component.rb +8 -0
  31. data/app/components/blacklight/constraints_component.rb +3 -3
  32. data/app/components/blacklight/document/action_component.rb +2 -1
  33. data/app/components/blacklight/document/bookmark_component.html.erb +2 -1
  34. data/app/components/blacklight/document/bookmark_component.rb +6 -0
  35. data/app/components/blacklight/document/page_header_component.html.erb +7 -0
  36. data/app/components/blacklight/document/page_header_component.rb +85 -0
  37. data/app/components/blacklight/document_component.rb +1 -1
  38. data/app/components/blacklight/facet_component.rb +1 -1
  39. data/app/components/blacklight/facet_field_checkboxes_component.html.erb +1 -1
  40. data/app/components/blacklight/facet_field_checkboxes_component.rb +1 -1
  41. data/app/components/blacklight/facet_field_inclusive_constraint_component.html.erb +1 -1
  42. data/app/components/blacklight/facet_field_list_component.html.erb +1 -1
  43. data/app/components/blacklight/facet_item_component.rb +1 -1
  44. data/app/components/blacklight/facet_item_pivot_component.rb +2 -2
  45. data/app/components/blacklight/icons/bookmark_icon_component.rb +17 -0
  46. data/app/components/blacklight/icons/icon_component.rb +9 -4
  47. data/app/components/blacklight/icons/remove_component.rb +16 -0
  48. data/app/components/blacklight/metadata_field_component.html.erb +1 -1
  49. data/app/components/blacklight/metadata_field_component.rb +5 -0
  50. data/app/components/blacklight/response/facet_group_component.rb +1 -1
  51. data/app/components/blacklight/response/pagination_component.html.erb +1 -1
  52. data/app/components/blacklight/response/sort_component.html.erb +1 -6
  53. data/app/components/blacklight/response/sort_component.rb +15 -0
  54. data/app/components/blacklight/search/per_page_component.html.erb +2 -0
  55. data/app/components/blacklight/search/per_page_component.rb +50 -0
  56. data/app/components/blacklight/search_bar_component.html.erb +1 -1
  57. data/app/components/blacklight/search_context/server_item_pagination_component.html.erb +4 -7
  58. data/app/components/blacklight/skip_link_component.html.erb +7 -0
  59. data/app/components/blacklight/skip_link_component.rb +17 -0
  60. data/app/components/blacklight/system/dropdown_button_component.rb +18 -0
  61. data/app/components/blacklight/system/dropdown_component.rb +4 -7
  62. data/app/components/blacklight/system/flash_message_component.html.erb +1 -1
  63. data/app/components/blacklight/top_navbar_component.html.erb +2 -2
  64. data/app/components/blacklight/top_navbar_component.rb +4 -0
  65. data/app/helpers/blacklight/catalog_helper_behavior.rb +3 -5
  66. data/app/helpers/blacklight/component_helper_behavior.rb +4 -4
  67. data/app/helpers/blacklight/configuration_helper_behavior.rb +2 -0
  68. data/app/helpers/blacklight/layout_helper_behavior.rb +3 -3
  69. data/app/javascript/blacklight/checkbox_submit.js +5 -1
  70. data/app/models/concerns/blacklight/document/semantic_fields.rb +1 -1
  71. data/app/presenters/blacklight/facet_checkbox_item_presenter.rb +11 -0
  72. data/app/presenters/blacklight/facet_field_presenter.rb +9 -1
  73. data/app/services/blacklight/search_service.rb +9 -1
  74. data/app/views/catalog/_per_page_widget.html.erb +1 -10
  75. data/app/views/catalog/_search_results.html.erb +1 -1
  76. data/app/views/catalog/_show_main_content.html.erb +1 -1
  77. data/app/views/catalog/show.html.erb +0 -2
  78. data/app/views/catalog/suggest.html.erb +1 -1
  79. data/app/views/kaminari/blacklight/_page.html.erb +14 -8
  80. data/app/views/layouts/blacklight/base.html.erb +3 -4
  81. data/app/views/shared/_flash_messages.html.erb +1 -1
  82. data/blacklight.gemspec +4 -0
  83. data/{docker-compose.yml → compose.yaml} +1 -1
  84. data/config/locales/blacklight.ar.yml +3 -0
  85. data/config/locales/blacklight.de.yml +3 -0
  86. data/config/locales/blacklight.en.yml +216 -229
  87. data/config/locales/blacklight.es.yml +3 -0
  88. data/config/locales/blacklight.fr.yml +3 -0
  89. data/config/locales/blacklight.hu.yml +3 -0
  90. data/config/locales/blacklight.it.yml +3 -0
  91. data/config/locales/blacklight.nl.yml +3 -0
  92. data/config/locales/blacklight.pt-BR.yml +3 -0
  93. data/config/locales/blacklight.sq.yml +3 -0
  94. data/config/locales/blacklight.zh.yml +3 -0
  95. data/lib/blacklight/abstract_repository.rb +6 -0
  96. data/lib/blacklight/configuration.rb +33 -19
  97. data/lib/blacklight/nested_open_struct_with_hash_access.rb +2 -2
  98. data/lib/blacklight/parameters.rb +1 -1
  99. data/lib/blacklight/solr/repository.rb +11 -4
  100. data/lib/blacklight/solr/request.rb +1 -1
  101. data/lib/blacklight/solr/response/facets.rb +1 -1
  102. data/lib/blacklight/solr/response/params.rb +1 -1
  103. data/lib/blacklight/solr/response.rb +0 -12
  104. data/lib/blacklight/solr/search_builder_behavior.rb +2 -2
  105. data/lib/blacklight/solr.rb +0 -6
  106. data/lib/blacklight.rb +4 -14
  107. data/lib/generators/blacklight/assets/propshaft_generator.rb +2 -2
  108. data/lib/generators/blacklight/models_generator.rb +1 -1
  109. data/package.json +1 -1
  110. data/spec/components/blacklight/advanced_search_form_component_spec.rb +2 -2
  111. data/spec/components/blacklight/constraint_layout_component_spec.rb +11 -11
  112. data/spec/components/blacklight/constraints_component_spec.rb +9 -9
  113. data/spec/components/blacklight/document/action_component_spec.rb +1 -1
  114. data/spec/components/blacklight/document/group_component_spec.rb +3 -3
  115. data/spec/components/blacklight/document/page_header_component_spec.rb +92 -0
  116. data/spec/components/blacklight/document/sidebar_component_spec.rb +3 -4
  117. data/spec/components/blacklight/document_component_spec.rb +41 -25
  118. data/spec/components/blacklight/facet_component_spec.rb +2 -2
  119. data/spec/components/blacklight/facet_field_checkboxes_component_spec.rb +5 -5
  120. data/spec/components/blacklight/facet_field_list_component_spec.rb +13 -13
  121. data/spec/components/blacklight/facet_item_component_spec.rb +5 -5
  122. data/spec/components/blacklight/facet_item_pivot_component_spec.rb +6 -6
  123. data/spec/components/blacklight/header_component_spec.rb +1 -2
  124. data/spec/components/blacklight/hidden_search_state_component_spec.rb +6 -6
  125. data/spec/components/blacklight/icons/icon_component_spec.rb +42 -0
  126. data/spec/components/blacklight/metadata_field_component_spec.rb +3 -3
  127. data/spec/components/blacklight/response/pagination_component_spec.rb +4 -4
  128. data/spec/components/blacklight/search_context/server_applied_params_component_spec.rb +1 -1
  129. data/spec/components/blacklight/search_context/server_item_pagination_component_spec.rb +2 -4
  130. data/spec/components/blacklight/system/flash_message_component_spec.rb +5 -5
  131. data/spec/controllers/blacklight/catalog_spec.rb +2 -2
  132. data/spec/controllers/blacklight/{catalog/component_configuration_spec.rb → configurable_spec.rb} +1 -1
  133. data/spec/controllers/bookmarks_controller_spec.rb +10 -10
  134. data/spec/controllers/catalog_controller_spec.rb +29 -31
  135. data/spec/features/advanced_search_spec.rb +30 -16
  136. data/spec/features/alternate_controller_spec.rb +9 -9
  137. data/spec/features/axe_spec.rb +4 -4
  138. data/spec/features/bookmarks_spec.rb +34 -19
  139. data/spec/features/citation_spec.rb +1 -1
  140. data/spec/features/did_you_mean_spec.rb +23 -23
  141. data/spec/features/facet_missing_spec.rb +9 -9
  142. data/spec/features/facets_spec.rb +21 -20
  143. data/spec/features/modal_spec.rb +4 -4
  144. data/spec/features/record_view_spec.rb +2 -2
  145. data/spec/features/search_context_spec.rb +6 -6
  146. data/spec/features/search_crawler_spec.rb +5 -5
  147. data/spec/features/search_filters_spec.rb +65 -65
  148. data/spec/features/search_history_spec.rb +12 -12
  149. data/spec/features/search_pagination_spec.rb +10 -10
  150. data/spec/features/search_results_spec.rb +1 -1
  151. data/spec/features/search_sort_spec.rb +4 -4
  152. data/spec/features/search_spec.rb +25 -25
  153. data/spec/features/sitelinks_search_box_spec.rb +2 -2
  154. data/spec/features/sms_spec.rb +1 -1
  155. data/spec/helpers/blacklight/facets_helper_behavior_spec.rb +2 -2
  156. data/spec/helpers/blacklight/layout_helper_behavior_spec.rb +20 -3
  157. data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +2 -1
  158. data/spec/helpers/blacklight/url_helper_behavior_spec.rb +7 -8
  159. data/spec/helpers/blacklight_helper_spec.rb +13 -15
  160. data/spec/helpers/catalog_helper_spec.rb +3 -6
  161. data/spec/i18n_spec.rb +2 -1
  162. data/spec/lib/blacklight/nested_open_struct_with_hash_access_spec.rb +1 -1
  163. data/spec/lib/blacklight/open_struct_with_hash_access_spec.rb +1 -1
  164. data/spec/lib/blacklight/search_state_spec.rb +4 -4
  165. data/spec/lib/tasks/blacklight_task_spec.rb +2 -1
  166. data/spec/models/blacklight/configurable_spec.rb +1 -1
  167. data/spec/models/blacklight/configuration/context_spec.rb +1 -1
  168. data/spec/models/blacklight/configuration_spec.rb +14 -14
  169. data/spec/models/blacklight/document/active_model_shim_spec.rb +1 -1
  170. data/spec/models/blacklight/document/cache_key_spec.rb +1 -1
  171. data/spec/models/blacklight/document_spec.rb +1 -1
  172. data/spec/models/blacklight/facet_paginator_spec.rb +14 -14
  173. data/spec/models/blacklight/icon_spec.rb +1 -1
  174. data/spec/models/blacklight/search_builder_spec.rb +1 -1
  175. data/spec/models/blacklight/solr/document_spec.rb +3 -3
  176. data/spec/models/blacklight/solr/facet_paginator_spec.rb +1 -1
  177. data/spec/models/blacklight/solr/repository_spec.rb +33 -15
  178. data/spec/models/blacklight/solr/request_spec.rb +1 -1
  179. data/spec/models/blacklight/solr/response/facets_spec.rb +3 -3
  180. data/spec/models/blacklight/solr/response/group_response_spec.rb +1 -1
  181. data/spec/models/blacklight/solr/response/group_spec.rb +2 -2
  182. data/spec/models/blacklight/solr/response_spec.rb +3 -3
  183. data/spec/models/blacklight/solr/{search_builder_spec.rb → search_builder_behavior_spec.rb} +10 -20
  184. data/spec/models/blacklight/suggest/response_spec.rb +1 -1
  185. data/spec/models/blacklight/suggest_search_spec.rb +1 -1
  186. data/spec/models/blacklight/user_spec.rb +1 -1
  187. data/spec/models/bookmark_spec.rb +1 -1
  188. data/spec/models/solr_document_spec.rb +1 -1
  189. data/spec/presenters/blacklight/document_presenter_spec.rb +3 -4
  190. data/spec/presenters/blacklight/facet_checkbox_item_presenter_spec.rb +42 -0
  191. data/spec/presenters/blacklight/facet_field_presenter_spec.rb +14 -0
  192. data/spec/presenters/blacklight/field_presenter_spec.rb +1 -1
  193. data/spec/presenters/blacklight/index_presenter_spec.rb +2 -3
  194. data/spec/presenters/blacklight/json_presenter_spec.rb +1 -1
  195. data/spec/presenters/{pipeline_spec.rb → blacklight/rendering/pipeline_spec.rb} +1 -1
  196. data/spec/presenters/blacklight/show_presenter_spec.rb +5 -6
  197. data/spec/presenters/{thumbnail_presenter_spec.rb → blacklight/thumbnail_presenter_spec.rb} +5 -3
  198. data/spec/requests/load_suggestions_spec.rb +5 -5
  199. data/spec/routing/catalog_routing_spec.rb +1 -1
  200. data/spec/services/blacklight/field_retriever_spec.rb +1 -1
  201. data/spec/services/blacklight/search_service_spec.rb +11 -11
  202. data/spec/spec_helper.rb +2 -2
  203. data/spec/support/features/search_helpers.rb +2 -2
  204. data/spec/support/features/session_helpers.rb +3 -3
  205. data/spec/test_app_templates/lib/generators/test_app_generator.rb +3 -3
  206. data/spec/views/catalog/_document.html.erb_spec.rb +1 -4
  207. data/spec/views/catalog/_document_list.html.erb_spec.rb +2 -2
  208. data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +5 -6
  209. data/spec/views/catalog/_facet_layout.html.erb_spec.rb +7 -7
  210. data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +4 -4
  211. data/spec/views/catalog/_show_sidebar.erb_spec.rb +1 -4
  212. data/spec/views/catalog/_show_tools.html.erb_spec.rb +1 -2
  213. data/spec/views/catalog/_view_type_group.html.erb_spec.rb +7 -7
  214. data/spec/views/catalog/email_success.html.erb_spec.rb +1 -1
  215. data/spec/views/catalog/facet.html.erb_spec.rb +1 -1
  216. data/spec/views/catalog/facet.json.jbuilder_spec.rb +1 -1
  217. data/spec/views/catalog/index.atom.builder_spec.rb +18 -19
  218. data/spec/views/catalog/index.html.erb_spec.rb +2 -4
  219. data/spec/views/catalog/index.json.jbuilder_spec.rb +5 -8
  220. data/spec/views/catalog/show.html.erb_spec.rb +3 -5
  221. data/spec/views/catalog/show.json.jbuilder_spec.rb +1 -2
  222. data/spec/views/catalog/sms_success.html.erb_spec.rb +1 -1
  223. data/spec/views/shared/_user_util_links.html.erb_spec.rb +2 -3
  224. data/tasks/blacklight.rake +5 -5
  225. metadata +84 -12
@@ -11,8 +11,7 @@ RSpec.describe Blacklight::UrlHelperBehavior do
11
11
  let(:parameter_class) { ActionController::Parameters }
12
12
 
13
13
  before do
14
- allow(controller).to receive(:controller_name).and_return('test')
15
- allow(controller).to receive(:search_state_class).and_return(Blacklight::SearchState)
14
+ allow(controller).to receive_messages(controller_name: 'test', search_state_class: Blacklight::SearchState)
16
15
  allow(helper).to receive(:search_action_path) do |*args|
17
16
  search_catalog_url *args
18
17
  end
@@ -112,18 +111,18 @@ RSpec.describe Blacklight::UrlHelperBehavior do
112
111
  end
113
112
 
114
113
  it "consists of the document title wrapped in a <a>" do
115
- expect(helper.link_to_document(document)).to have_selector("a", text: '654321', count: 1)
114
+ expect(helper.link_to_document(document)).to have_css("a", text: '654321', count: 1)
116
115
  end
117
116
 
118
117
  it "accepts and returns a string label" do
119
- expect(helper.link_to_document(document, 'This is the title')).to have_selector("a", text: 'This is the title', count: 1)
118
+ expect(helper.link_to_document(document, 'This is the title')).to have_css("a", text: 'This is the title', count: 1)
120
119
  end
121
120
 
122
121
  context 'when label is missing' do
123
122
  let(:data) { { 'id' => id } }
124
123
 
125
124
  it "returns id" do
126
- expect(helper.link_to_document(document)).to have_selector("a", text: '123456', count: 1)
125
+ expect(helper.link_to_document(document)).to have_css("a", text: '123456', count: 1)
127
126
  end
128
127
 
129
128
  it "is html safe" do
@@ -142,7 +141,7 @@ RSpec.describe Blacklight::UrlHelperBehavior do
142
141
  let(:id) { 123_456 }
143
142
 
144
143
  it "has a link" do
145
- expect(helper.link_to_document(document)).to have_selector("a")
144
+ expect(helper.link_to_document(document)).to have_css("a")
146
145
  end
147
146
  end
148
147
  end
@@ -154,14 +153,14 @@ RSpec.describe Blacklight::UrlHelperBehavior do
154
153
 
155
154
  it "includes the data- attributes from the options" do
156
155
  link = helper.link_to_document document, data: { x: 1 }
157
- expect(link).to have_selector '[data-x]'
156
+ expect(link).to have_css '[data-x]'
158
157
  end
159
158
 
160
159
  it 'adds a controller-specific tracking attribute' do
161
160
  expect(helper.main_app).to receive(:track_test_path).and_return('/asdf')
162
161
  link = helper.link_to_document document, data: { x: 1 }
163
162
 
164
- expect(link).to have_selector '[data-context-href="/asdf"]'
163
+ expect(link).to have_css '[data-context-href="/asdf"]'
165
164
  end
166
165
  end
167
166
 
@@ -73,8 +73,7 @@ RSpec.describe BlacklightHelper do
73
73
  end
74
74
 
75
75
  before do
76
- allow(helper).to receive(:document_presenter).and_return(presenter)
77
- allow(helper).to receive(:blacklight_config).and_return(blacklight_config)
76
+ allow(helper).to receive_messages(document_presenter: presenter, blacklight_config: blacklight_config)
78
77
  end
79
78
 
80
79
  it "generates <link rel=alternate> tags" do
@@ -109,8 +108,8 @@ RSpec.describe BlacklightHelper do
109
108
  it "renders partials" do
110
109
  buff = String.new
111
110
  helper.render_nav_actions { |_config, item| buff << "<foo>#{item}</foo>" }
112
- expect(buff).to have_selector "foo a#bookmarks_nav[href=\"/bookmarks\"]"
113
- expect(buff).to have_selector "foo a span[data-role='bookmark-counter']", text: '0'
111
+ expect(buff).to have_css "foo a#bookmarks_nav[href=\"/bookmarks\"]"
112
+ expect(buff).to have_css "foo a span[data-role='bookmark-counter']", text: '0'
114
113
  end
115
114
  end
116
115
 
@@ -118,7 +117,7 @@ RSpec.describe BlacklightHelper do
118
117
  it "renders partials" do
119
118
  allow(controller).to receive(:render_bookmarks_control?).and_return(true)
120
119
  response = helper.render_index_doc_actions(document)
121
- expect(response).to have_selector(".bookmark-toggle")
120
+ expect(response).to have_css(".bookmark-toggle")
122
121
  end
123
122
 
124
123
  it "is nil if no partials are renderable" do
@@ -138,27 +137,28 @@ RSpec.describe BlacklightHelper do
138
137
  subject { helper.opensearch_description_tag 'title', 'href' }
139
138
 
140
139
  it "has a search rel" do
141
- expect(subject).to have_selector "link[rel='search']", visible: false
140
+ expect(subject).to have_css "link[rel='search']", visible: false
142
141
  end
143
142
 
144
143
  it "has the correct mime type" do
145
- expect(subject).to have_selector "link[type='application/opensearchdescription+xml']", visible: false
144
+ expect(subject).to have_css "link[type='application/opensearchdescription+xml']", visible: false
146
145
  end
147
146
 
148
147
  it "has a title attribute" do
149
- expect(subject).to have_selector "link[title='title']", visible: false
148
+ expect(subject).to have_css "link[title='title']", visible: false
150
149
  end
151
150
 
152
151
  it "has an href attribute" do
153
- expect(subject).to have_selector "link[href='href']", visible: false
152
+ expect(subject).to have_css "link[href='href']", visible: false
154
153
  end
155
154
  end
156
155
 
157
156
  describe "#render_document_index" do
158
157
  it "renders the document index with the current view type" do
159
158
  allow(helper).to receive_messages(document_index_view_type: :current_view)
160
- allow(helper).to receive(:render_document_index_with_view).with(:current_view, [], { a: 1, b: 2 })
159
+ allow(helper).to receive(:render_document_index_with_view)
161
160
  helper.render_document_index [], a: 1, b: 2
161
+ expect(helper).to have_received(:render_document_index_with_view).with(:current_view, [], { a: 1, b: 2 })
162
162
  end
163
163
  end
164
164
 
@@ -167,17 +167,15 @@ RSpec.describe BlacklightHelper do
167
167
  let(:blacklight_config) { CatalogController.blacklight_config.deep_copy }
168
168
 
169
169
  before do
170
- allow(helper).to receive(:blacklight_config).and_return(blacklight_config)
171
170
  assign(:response, instance_double(Blacklight::Solr::Response, grouped?: false, start: 0))
172
- allow(helper).to receive(:link_to_document).and_return('<a/>')
173
- allow(helper).to receive(:render_index_doc_actions).and_return('<div/>')
171
+ allow(helper).to receive_messages(blacklight_config: blacklight_config, link_to_document: '<a/>', render_index_doc_actions: '<div/>')
174
172
  end
175
173
 
176
174
  it "ignores missing templates" do
177
175
  blacklight_config.view.view_type(partials: %w[index_header a b])
178
176
 
179
177
  response = helper.render_document_index_with_view :view_type, [obj1, obj1]
180
- expect(response).to have_selector "div#documents"
178
+ expect(response).to have_css "div#documents"
181
179
  end
182
180
 
183
181
  context 'with a template partial provided by the view config' do
@@ -191,7 +189,7 @@ RSpec.describe BlacklightHelper do
191
189
  # https://github.com/rspec/rspec-rails/commit/4d65bea0619955acb15023b9c3f57a3a53183da8
192
190
  # https://github.com/rspec/rspec-rails/issues/2696
193
191
  replace_hash = { 'my/_partial.html.erb' => 'some content' }
194
- if ::Rails.version.to_f >= 7.1
192
+ if Rails.version.to_f >= 7.1
195
193
  controller.prepend_view_path(RSpec::Rails::ViewExampleGroup::StubResolverCache.resolver_for(replace_hash))
196
194
  else
197
195
  view.view_paths.unshift(ActionView::FixtureResolver.new(replace_hash))
@@ -267,8 +267,7 @@ RSpec.describe CatalogHelper do
267
267
  subject { helper.render_search_to_page_title(Blacklight::SearchState.new(params, blacklight_config)) }
268
268
 
269
269
  before do
270
- allow(helper).to receive(:blacklight_config).and_return(blacklight_config)
271
- allow(helper).to receive(:default_search_field).and_return(Blacklight::Configuration::SearchField.new(key: 'default_search_field', display_label: 'Default'))
270
+ allow(helper).to receive_messages(blacklight_config: blacklight_config, default_search_field: Blacklight::Configuration::SearchField.new(key: 'default_search_field', display_label: 'Default'))
272
271
  allow(helper).to receive(:label_for_search_field).with(nil).and_return('')
273
272
  end
274
273
 
@@ -299,8 +298,7 @@ RSpec.describe CatalogHelper do
299
298
 
300
299
  describe "#document_index_view_type" do
301
300
  it "defaults to the default view" do
302
- allow(helper).to receive(:document_index_views).and_return(a: 1, b: 2)
303
- allow(helper).to receive(:default_document_index_view_type).and_return(:xyz)
301
+ allow(helper).to receive_messages(document_index_views: { a: 1, b: 2 }, default_document_index_view_type: :xyz)
304
302
  expect(helper.document_index_view_type).to eq :xyz
305
303
  end
306
304
 
@@ -310,8 +308,7 @@ RSpec.describe CatalogHelper do
310
308
  end
311
309
 
312
310
  it "uses the default view if the requested view is not available" do
313
- allow(helper).to receive(:default_document_index_view_type).and_return(:xyz)
314
- allow(helper).to receive(:document_index_views).and_return(a: 1, b: 2)
311
+ allow(helper).to receive_messages(default_document_index_view_type: :xyz, document_index_views: { a: 1, b: 2 })
315
312
  expect(helper.document_index_view_type(view: :c)).to eq :xyz
316
313
  end
317
314
 
data/spec/i18n_spec.rb CHANGED
@@ -12,7 +12,8 @@ RSpec.describe 'I18n', type: :i18n do
12
12
  "Missing #{missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them"
13
13
  end
14
14
 
15
- pending 'does not have unused keys' do
15
+ it 'does not have unused keys' do
16
+ pending 'Many unused keys are detected'
16
17
  expect(unused_keys).to be_empty,
17
18
  "#{unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused' to show them"
18
19
  end
@@ -23,7 +23,7 @@ RSpec.describe Blacklight::NestedOpenStructWithHashAccess do
23
23
 
24
24
  describe "#deep_dup" do
25
25
  it "preserves the current class" do
26
- expect(described_class.new(described_class).deep_dup).to be_a_kind_of described_class
26
+ expect(described_class.new(described_class).deep_dup).to be_a described_class
27
27
  end
28
28
 
29
29
  it "preserves the default proc" do
@@ -36,7 +36,7 @@ RSpec.describe Blacklight::OpenStructWithHashAccess do
36
36
  end
37
37
 
38
38
  it "exposes the internal hash table" do
39
- expect(@h.to_h).to be_a_kind_of(Hash)
39
+ expect(@h.to_h).to be_a(Hash)
40
40
  expect(@h.to_h[:a]).to eq 1
41
41
  end
42
42
 
@@ -37,7 +37,7 @@ RSpec.describe Blacklight::SearchState do
37
37
  end
38
38
 
39
39
  context 'with HashWithIndifferentAccess' do
40
- let(:parameter_class) { HashWithIndifferentAccess }
40
+ let(:parameter_class) { ActiveSupport::HashWithIndifferentAccess }
41
41
 
42
42
  it 'returns the hash data' do
43
43
  expect(search_state.to_h).to eq data.with_indifferent_access
@@ -356,7 +356,7 @@ RSpec.describe Blacklight::SearchState do
356
356
  end
357
357
 
358
358
  describe "#url_for_document" do
359
- let(:controller_class) { ::CatalogController.new }
359
+ let(:controller_class) { CatalogController.new }
360
360
  let(:doc) { SolrDocument.new }
361
361
 
362
362
  before do
@@ -375,7 +375,7 @@ RSpec.describe Blacklight::SearchState do
375
375
  end
376
376
 
377
377
  context "within bookmarks" do
378
- let(:controller_class) { ::BookmarksController.new }
378
+ let(:controller_class) { BookmarksController.new }
379
379
 
380
380
  it "uses polymorphic routing" do
381
381
  expect(search_state.url_for_document(doc)).to eq doc
@@ -383,7 +383,7 @@ RSpec.describe Blacklight::SearchState do
383
383
  end
384
384
 
385
385
  context "within an alternative catalog controller" do
386
- let(:controller_class) { ::AlternateController.new }
386
+ let(:controller_class) { AlternateController.new }
387
387
 
388
388
  before do
389
389
  search_state.blacklight_config.show.route = { controller: :current }
@@ -13,7 +13,8 @@ RSpec.describe "blacklight:delete_old_searches" do
13
13
 
14
14
  it "calls Search.delete_old_searches" do
15
15
  days_old = 7
16
- allow(Search).to receive(:delete_old_searches).with(days_old)
16
+ allow(Search).to receive(:delete_old_searches)
17
17
  @rake[@task_name].invoke(days_old)
18
+ expect(Search).to have_received(:delete_old_searches).with(days_old)
18
19
  end
19
20
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe "Blacklight::Configurable", api: true do
3
+ RSpec.describe "Blacklight::Configurable", :api do
4
4
  describe "inheritence" do
5
5
  before(:all) do
6
6
  module TestCaseInheritence
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe Blacklight::Configuration::Context, api: true do
3
+ RSpec.describe Blacklight::Configuration::Context, :api do
4
4
  subject { described_class.new(context) }
5
5
 
6
6
  let(:context) { double }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe "Blacklight::Configuration", api: true do
3
+ RSpec.describe "Blacklight::Configuration", :api do
4
4
  let(:config) do
5
5
  Blacklight::Configuration.new
6
6
  end
@@ -14,7 +14,7 @@ RSpec.describe "Blacklight::Configuration", api: true do
14
14
 
15
15
  describe "initialization" do
16
16
  it "is an OpenStructWithHashAccess" do
17
- expect(config).to be_a_kind_of Blacklight::OpenStructWithHashAccess
17
+ expect(config).to be_a Blacklight::OpenStructWithHashAccess
18
18
  end
19
19
 
20
20
  it "accepts a block for configuration" do
@@ -30,22 +30,22 @@ RSpec.describe "Blacklight::Configuration", api: true do
30
30
 
31
31
  describe "defaults" do
32
32
  it "has a hash of default rsolr query parameters" do
33
- expect(config.default_solr_params).to be_a_kind_of Hash
33
+ expect(config.default_solr_params).to be_a Hash
34
34
  end
35
35
 
36
36
  it "has openstruct values for show and index parameters" do
37
- expect(config.show).to be_a_kind_of OpenStruct
38
- expect(config.index).to be_a_kind_of OpenStruct
37
+ expect(config.show).to be_a OpenStruct
38
+ expect(config.index).to be_a OpenStruct
39
39
  end
40
40
 
41
41
  it "has ordered hashes for field configuration" do
42
- expect(config.facet_fields).to be_a_kind_of Hash
43
- expect(config.index_fields).to be_a_kind_of Hash
44
- expect(config.show_fields).to be_a_kind_of Hash
45
- expect(config.search_fields).to be_a_kind_of Hash
46
- expect(config.show_fields).to be_a_kind_of Hash
47
- expect(config.search_fields).to be_a_kind_of Hash
48
- expect(config.sort_fields).to be_a_kind_of Hash
42
+ expect(config.facet_fields).to be_a Hash
43
+ expect(config.index_fields).to be_a Hash
44
+ expect(config.show_fields).to be_a Hash
45
+ expect(config.search_fields).to be_a Hash
46
+ expect(config.show_fields).to be_a Hash
47
+ expect(config.search_fields).to be_a Hash
48
+ expect(config.sort_fields).to be_a Hash
49
49
  end
50
50
  end
51
51
 
@@ -197,7 +197,7 @@ RSpec.describe "Blacklight::Configuration", api: true do
197
197
  config.add_my_custom_facet_field 'qwerty', label: "asdf"
198
198
  end
199
199
 
200
- expect(config.my_custom_facet_fields['qwerty']).to be_a_kind_of(Blacklight::Configuration::FacetField)
200
+ expect(config.my_custom_facet_fields['qwerty']).to be_a(Blacklight::Configuration::FacetField)
201
201
  end
202
202
  end
203
203
 
@@ -352,7 +352,7 @@ RSpec.describe "Blacklight::Configuration", api: true do
352
352
  expect(config.index_fields.keys).to eq %w[some_field_display another_field_display]
353
353
  end
354
354
 
355
- it "queries solr and get live values for match fields", integration: true do
355
+ it "queries solr and get live values for match fields", :integration do
356
356
  config.add_index_field match: /title.+sim/
357
357
  expect(config.index_fields.keys).to include "subtitle_tsim", "subtitle_vern_ssim", "title_tsim", "title_vern_ssim"
358
358
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe 'Blacklight::Document::ActiveModelShim', api: true do
3
+ RSpec.describe 'Blacklight::Document::ActiveModelShim', :api do
4
4
  class MockDocument
5
5
  include Blacklight::Document
6
6
  include Blacklight::Document::ActiveModelShim
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe Blacklight::Document::CacheKey, api: true do
3
+ RSpec.describe Blacklight::Document::CacheKey, :api do
4
4
  let(:attributes) { {} }
5
5
  let(:subject) { SolrDocument.new(attributes) }
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe Blacklight::Document, api: true do
3
+ RSpec.describe Blacklight::Document, :api do
4
4
  subject do
5
5
  Class.new do
6
6
  include Blacklight::Document
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe Blacklight::FacetPaginator, api: true do
4
- let(:f1) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '792', value: 'Book') }
5
- let(:f2) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '65', value: 'Musical Score') }
6
- let(:f3) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '58', value: 'Serial') }
7
- let(:f4) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '48', value: 'Musical Recording') }
8
- let(:f5) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '37', value: 'Microform') }
9
- let(:f6) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '27', value: 'Thesis') }
10
- let(:f7) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '0') }
11
- let(:seven_facet_values) { [f1, f2, f3, f4, f5, f6, f7] }
12
- let(:six_facet_values) { [f1, f2, f3, f4, f5, f6] }
3
+ RSpec.describe Blacklight::FacetPaginator, :api do
4
+ let(:book) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '792', value: 'Book') }
5
+ let(:musical_score) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '65', value: 'Musical Score') }
6
+ let(:serial) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '58', value: 'Serial') }
7
+ let(:musical_recording) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '48', value: 'Musical Recording') }
8
+ let(:microform) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '37', value: 'Microform') }
9
+ let(:thesis) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '27', value: 'Thesis') }
10
+ let(:blank) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '0') }
11
+ let(:seven_facet_values) { [book, musical_score, serial, musical_recording, microform, thesis, blank] }
12
+ let(:six_facet_values) { [book, musical_score, serial, musical_recording, microform, thesis] }
13
13
  let(:limit) { 6 }
14
14
 
15
15
  context 'on the first page of two pages' do
@@ -42,7 +42,7 @@ RSpec.describe Blacklight::FacetPaginator, api: true do
42
42
  end
43
43
 
44
44
  context 'on the last page of two pages' do
45
- subject(:paginator) { described_class.new([f7], offset: 6, limit: limit) }
45
+ subject(:paginator) { described_class.new([blank], offset: 6, limit: limit) }
46
46
 
47
47
  it { is_expected.not_to be_first_page }
48
48
  it { is_expected.to be_last_page }
@@ -124,7 +124,7 @@ RSpec.describe Blacklight::FacetPaginator, api: true do
124
124
  context 'when sorting by "count"' do
125
125
  subject { described_class.new([]) }
126
126
 
127
- let(:params) { HashWithIndifferentAccess.new 'facet.prefix': 'A' }
127
+ let(:params) { ActiveSupport::HashWithIndifferentAccess.new 'facet.prefix': 'A' }
128
128
 
129
129
  it 'includes the prefix filter for "index" sorting' do
130
130
  expect(subject.params_for_resort_url('index', params)).to include 'facet.prefix': 'A'
@@ -159,7 +159,7 @@ RSpec.describe Blacklight::FacetPaginator, api: true do
159
159
  end
160
160
 
161
161
  describe "#as_json" do
162
- subject { described_class.new([f1], offset: 0, limit: nil).as_json }
162
+ subject { described_class.new([book], offset: 0, limit: nil).as_json }
163
163
 
164
164
  it "is well structured" do
165
165
  expect(subject).to eq("items" => [{ "hits" => "792", "value" => "Book" }], "limit" => nil,
@@ -169,7 +169,7 @@ RSpec.describe Blacklight::FacetPaginator, api: true do
169
169
 
170
170
  describe "#total_pages" do
171
171
  # this method is just for API compatability with kaminari 0.16.1
172
- subject { described_class.new([f1], offset: 0, limit: nil).total_pages }
172
+ subject { described_class.new([book], offset: 0, limit: nil).total_pages }
173
173
 
174
174
  it { is_expected.to eq -1 }
175
175
  end
@@ -39,7 +39,7 @@ RSpec.describe Blacklight::Icon do
39
39
 
40
40
  it 'does not add title' do
41
41
  expect(Capybara.string(subject.svg))
42
- .not_to have_css 'title', text: 'Test'
42
+ .to have_no_css 'title', text: 'Test'
43
43
  end
44
44
  end
45
45
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe Blacklight::SearchBuilder, api: true do
3
+ RSpec.describe Blacklight::SearchBuilder, :api do
4
4
  subject(:builder) { described_class.new processor_chain, scope }
5
5
 
6
6
  let(:processor_chain) { [] }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe "Blacklight::Solr::Document", api: true do
3
+ RSpec.describe "Blacklight::Solr::Document", :api do
4
4
  class MockDocument
5
5
  include Blacklight::Solr::Document
6
6
  end
@@ -231,7 +231,7 @@ RSpec.describe "Blacklight::Solr::Document", api: true do
231
231
  end
232
232
 
233
233
  it "returns an array even for a single-value field" do
234
- expect(@doc1.to_semantic_values[:title]).to be_kind_of(Array)
234
+ expect(@doc1.to_semantic_values[:title]).to be_a(Array)
235
235
  end
236
236
 
237
237
  it "returns complete array for a multi-value field" do
@@ -290,7 +290,7 @@ RSpec.describe "Blacklight::Solr::Document", api: true do
290
290
 
291
291
  it "plucks the MoreLikeThis results from the Solr Response" do
292
292
  expect(result).to have(1).item
293
- expect(result.first).to be_a_kind_of(MockDocument)
293
+ expect(result.first).to be_a(MockDocument)
294
294
  expect(result.first.id).to eq 'abc'
295
295
  expect(result.first.solr_response).to eq response
296
296
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe Blacklight::Solr::FacetPaginator, api: true do
3
+ RSpec.describe Blacklight::Solr::FacetPaginator, :api do
4
4
  let(:f1) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '792', value: 'Book') }
5
5
 
6
6
  describe "#as_json" do
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe Blacklight::Solr::Repository, api: true do
3
+ RSpec.describe Blacklight::Solr::Repository, :api do
4
4
  subject(:repository) do
5
5
  described_class.new blacklight_config
6
6
  end
@@ -24,12 +24,12 @@ RSpec.describe Blacklight::Solr::Repository, api: true do
24
24
  blacklight_config.document_solr_path = 'abc'
25
25
  blacklight_config.solr_path = 'xyz'
26
26
  allow(subject.connection).to receive(:send_and_receive).with('abc', anything).and_return(mock_response)
27
- expect(subject.find("123")).to be_a_kind_of Blacklight::Solr::Response
27
+ expect(subject.find("123")).to be_a Blacklight::Solr::Response
28
28
  end
29
29
 
30
30
  it "uses a default :qt param" do
31
31
  allow(subject.connection).to receive(:send_and_receive).with('get', hash_including(params: hash_including(ids: '123'))).and_return(mock_response)
32
- expect(subject.find("123", {})).to be_a_kind_of Blacklight::Solr::Response
32
+ expect(subject.find("123", {})).to be_a Blacklight::Solr::Response
33
33
  end
34
34
 
35
35
  context "without a document solr path configured" do
@@ -40,7 +40,7 @@ RSpec.describe Blacklight::Solr::Repository, api: true do
40
40
  it "uses the default solr path" do
41
41
  blacklight_config.solr_path = 'xyz'
42
42
  allow(subject.connection).to receive(:send_and_receive).with('xyz', anything).and_return(mock_response)
43
- expect(subject.find("123")).to be_a_kind_of Blacklight::Solr::Response
43
+ expect(subject.find("123")).to be_a Blacklight::Solr::Response
44
44
  end
45
45
  end
46
46
 
@@ -53,14 +53,14 @@ RSpec.describe Blacklight::Solr::Repository, api: true do
53
53
  it "uses the provided :qt param" do
54
54
  blacklight_config.document_solr_request_handler = 'xyz'
55
55
  allow(subject.connection).to receive(:send_and_receive).with('select', hash_including(params: { id: '123', qt: 'abc' })).and_return(mock_response)
56
- expect(subject.find("123", qt: 'abc')).to be_a_kind_of Blacklight::Solr::Response
56
+ expect(subject.find("123", qt: 'abc')).to be_a Blacklight::Solr::Response
57
57
  end
58
58
 
59
59
  it "uses the :qt parameter from the default_document_solr_params" do
60
60
  blacklight_config.default_document_solr_params[:qt] = 'abc'
61
61
  blacklight_config.document_solr_request_handler = 'xyz'
62
62
  allow(subject.connection).to receive(:send_and_receive).with('select', hash_including(params: { id: '123', qt: 'abc' })).and_return(mock_response)
63
- expect(subject.find("123")).to be_a_kind_of Blacklight::Solr::Response
63
+ expect(subject.find("123")).to be_a Blacklight::Solr::Response
64
64
  end
65
65
  end
66
66
 
@@ -68,8 +68,26 @@ RSpec.describe Blacklight::Solr::Repository, api: true do
68
68
  doc_params = ActiveSupport::HashWithIndifferentAccess.new
69
69
  allow(subject.connection).to receive(:send_and_receive).with('get', anything).and_return(mock_response)
70
70
  response = subject.find("123", doc_params)
71
- expect(response).to be_a_kind_of Blacklight::Solr::Response
72
- expect(response.params).to be_a_kind_of ActiveSupport::HashWithIndifferentAccess
71
+ expect(response).to be_a Blacklight::Solr::Response
72
+ expect(response.params).to be_a ActiveSupport::HashWithIndifferentAccess
73
+ end
74
+ end
75
+
76
+ describe '#find_many' do
77
+ context 'with a configured fetch_many_documents_path' do
78
+ it 'uses the path' do
79
+ blacklight_config.fetch_many_documents_path = 'documents'
80
+ allow(subject.connection).to receive(:send_and_receive).with('documents', anything).and_return(mock_response)
81
+ expect(subject.find_many({})).to be_a Blacklight::Solr::Response
82
+ end
83
+ end
84
+
85
+ context 'without a configured fetch_many_documents_path' do
86
+ it 'falls back to the search path' do
87
+ blacklight_config.solr_path = 'xyz'
88
+ allow(subject.connection).to receive(:send_and_receive).with('xyz', anything).and_return(mock_response)
89
+ expect(subject.find_many({})).to be_a Blacklight::Solr::Response
90
+ end
73
91
  end
74
92
  end
75
93
 
@@ -77,24 +95,24 @@ RSpec.describe Blacklight::Solr::Repository, api: true do
77
95
  it "uses the search-specific solr path" do
78
96
  blacklight_config.solr_path = 'xyz'
79
97
  allow(subject.connection).to receive(:send_and_receive).with('xyz', anything).and_return(mock_response)
80
- expect(subject.search({})).to be_a_kind_of Blacklight::Solr::Response
98
+ expect(subject.search({})).to be_a Blacklight::Solr::Response
81
99
  end
82
100
 
83
101
  it "uses the default solr path" do
84
102
  allow(subject.connection).to receive(:send_and_receive).with('select', anything).and_return(mock_response)
85
- expect(subject.search({})).to be_a_kind_of Blacklight::Solr::Response
103
+ expect(subject.search({})).to be_a Blacklight::Solr::Response
86
104
  end
87
105
 
88
106
  it "uses a default :qt param" do
89
107
  blacklight_config.qt = 'xyz'
90
108
  allow(subject.connection).to receive(:send_and_receive).with('select', hash_including(params: { qt: 'xyz' })).and_return(mock_response)
91
- expect(subject.search({})).to be_a_kind_of Blacklight::Solr::Response
109
+ expect(subject.search({})).to be_a Blacklight::Solr::Response
92
110
  end
93
111
 
94
112
  it "uses the provided :qt param" do
95
113
  blacklight_config.qt = 'xyz'
96
114
  allow(subject.connection).to receive(:send_and_receive).with('select', hash_including(params: { qt: 'abc' })).and_return(mock_response)
97
- expect(subject.search(qt: 'abc')).to be_a_kind_of Blacklight::Solr::Response
115
+ expect(subject.search(qt: 'abc')).to be_a Blacklight::Solr::Response
98
116
  end
99
117
 
100
118
  it "preserves the class of the incoming params" do
@@ -103,8 +121,8 @@ RSpec.describe Blacklight::Solr::Repository, api: true do
103
121
  allow(subject.connection).to receive(:send_and_receive).with('select', anything).and_return(mock_response)
104
122
 
105
123
  response = subject.search(search_params)
106
- expect(response).to be_a_kind_of Blacklight::Solr::Response
107
- expect(response.params).to be_a_kind_of ActiveSupport::HashWithIndifferentAccess
124
+ expect(response).to be_a Blacklight::Solr::Response
125
+ expect(response.params).to be_a ActiveSupport::HashWithIndifferentAccess
108
126
  end
109
127
 
110
128
  it "calls send_and_receive with params returned from request factory method" do
@@ -183,7 +201,7 @@ RSpec.describe Blacklight::Solr::Repository, api: true do
183
201
  end
184
202
  end
185
203
 
186
- describe "http_method configuration", integration: true do
204
+ describe "http_method configuration", :integration do
187
205
  let (:blacklight_config) { config = Blacklight::Configuration.new; config.http_method = :post; config }
188
206
 
189
207
  it "sends a post request to solr and get a response back" do
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe Blacklight::Solr::Request, api: true do
3
+ RSpec.describe Blacklight::Solr::Request, :api do
4
4
  context 'with some solr parameter keys' do
5
5
  before do
6
6
  subject[:qt] = 'hey'
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe Blacklight::Solr::Response::Facets, api: true do
3
+ RSpec.describe Blacklight::Solr::Response::Facets, :api do
4
4
  describe Blacklight::Solr::Response::Facets::FacetField do
5
5
  describe "A field with default options" do
6
6
  subject(:field) { described_class.new "my_field", [] }
@@ -247,7 +247,7 @@ RSpec.describe Blacklight::Solr::Response::Facets, api: true do
247
247
  it "converts the query facets into a double RSolr FacetField" do
248
248
  field = subject.aggregations['my_query_facet_field']
249
249
 
250
- expect(field).to be_a_kind_of Blacklight::Solr::Response::Facets::FacetField
250
+ expect(field).to be_a Blacklight::Solr::Response::Facets::FacetField
251
251
 
252
252
  expect(field.name).to eq 'my_query_facet_field'
253
253
  expect(field.items.size).to eq 3
@@ -316,7 +316,7 @@ RSpec.describe Blacklight::Solr::Response::Facets, api: true do
316
316
  it "converts the pivot facet into a double RSolr FacetField" do
317
317
  field = subject.aggregations['my_pivot_facet_field']
318
318
 
319
- expect(field).to be_a_kind_of Blacklight::Solr::Response::Facets::FacetField
319
+ expect(field).to be_a Blacklight::Solr::Response::Facets::FacetField
320
320
 
321
321
  expect(field.name).to eq 'my_pivot_facet_field'
322
322