geoblacklight 4.0.0 → 4.1.1

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 (232) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +23 -8
  3. data/.gitignore +3 -0
  4. data/.standard.yml +1 -0
  5. data/Gemfile +13 -11
  6. data/README.md +1 -1
  7. data/Rakefile +42 -50
  8. data/app/assets/images/blacklight/american-geographical-society-library-uwm-libraries.svg +26 -0
  9. data/app/assets/images/blacklight/arizona.svg +4 -0
  10. data/app/assets/images/blacklight/circle-info-solid.svg +1 -0
  11. data/app/assets/images/blacklight/fire-solid.svg +1 -0
  12. data/app/assets/images/blacklight/lightbulb-solid.svg +1 -0
  13. data/app/assets/images/blacklight/nebraska.svg +4 -0
  14. data/app/assets/images/blacklight/rutgers.svg +5 -0
  15. data/app/assets/images/blacklight/triangle-exclamation-solid.svg +1 -0
  16. data/app/assets/javascripts/geoblacklight/basemaps.js +1 -1
  17. data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +8 -0
  18. data/app/components/geoblacklight/display_note_component.html.erb +1 -0
  19. data/app/components/geoblacklight/display_note_component.rb +47 -0
  20. data/app/components/geoblacklight/icon_facet_item_component.rb +2 -2
  21. data/app/controllers/download_controller.rb +36 -37
  22. data/app/controllers/relation_controller.rb +1 -0
  23. data/app/controllers/wms_controller.rb +1 -0
  24. data/app/helpers/arcgis_helper.rb +2 -1
  25. data/app/helpers/blacklight_helper.rb +2 -1
  26. data/app/helpers/carto_helper.rb +3 -2
  27. data/app/helpers/geoblacklight/geoblacklight_helper_behavior.rb +2 -1
  28. data/app/helpers/geoblacklight_helper.rb +47 -36
  29. data/app/models/concerns/geoblacklight/bbox_filter_query.rb +1 -1
  30. data/app/models/concerns/geoblacklight/solr_document/arcgis.rb +1 -0
  31. data/app/models/concerns/geoblacklight/solr_document/carto.rb +1 -0
  32. data/app/models/concerns/geoblacklight/solr_document/citation.rb +3 -2
  33. data/app/models/concerns/geoblacklight/solr_document/finder.rb +1 -0
  34. data/app/models/concerns/geoblacklight/solr_document/inspection.rb +1 -0
  35. data/app/models/concerns/geoblacklight/solr_document.rb +17 -9
  36. data/app/models/concerns/geoblacklight/suppressed_records_search_behavior.rb +2 -1
  37. data/app/presenters/geoblacklight/document_presenter.rb +3 -2
  38. data/app/views/catalog/_citation.html.erb +35 -10
  39. data/app/views/catalog/_show_default_display_note.html.erb +7 -0
  40. data/app/views/catalog/_show_sidebar.html.erb +1 -0
  41. data/app/views/catalog/_show_sidebar_static_map.html.erb +10 -0
  42. data/app/views/relation/index.json.jbuilder +1 -1
  43. data/config/initializers/new_gbl_settings_defaults_4.1.yml +104 -0
  44. data/config/initializers/rails_config.rb +5 -1
  45. data/config/locales/geoblacklight.en.yml +18 -10
  46. data/geoblacklight.gemspec +36 -40
  47. data/lib/generators/geoblacklight/assets_generator.rb +15 -15
  48. data/lib/generators/geoblacklight/install_generator.rb +24 -23
  49. data/lib/generators/geoblacklight/templates/catalog_controller.rb +66 -71
  50. data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +2 -2
  51. data/lib/generators/geoblacklight/templates/settings.yml +76 -24
  52. data/lib/geoblacklight/bounding_box.rb +1 -0
  53. data/lib/geoblacklight/constants.rb +26 -25
  54. data/lib/geoblacklight/download/geojson_download.rb +10 -9
  55. data/lib/geoblacklight/download/geotiff_download.rb +6 -5
  56. data/lib/geoblacklight/download/hgl_download.rb +4 -3
  57. data/lib/geoblacklight/download/kmz_download.rb +11 -10
  58. data/lib/geoblacklight/download/shapefile_download.rb +10 -9
  59. data/lib/geoblacklight/download.rb +12 -11
  60. data/lib/geoblacklight/engine.rb +10 -9
  61. data/lib/geoblacklight/exceptions.rb +3 -0
  62. data/lib/geoblacklight/faraday_middleware/follow_redirects.rb +14 -11
  63. data/lib/geoblacklight/geometry.rb +6 -5
  64. data/lib/geoblacklight/item_viewer.rb +4 -3
  65. data/lib/geoblacklight/metadata/base.rb +4 -3
  66. data/lib/geoblacklight/metadata/fgdc.rb +1 -0
  67. data/lib/geoblacklight/metadata/html.rb +5 -4
  68. data/lib/geoblacklight/metadata/iso19139.rb +1 -0
  69. data/lib/geoblacklight/metadata.rb +1 -0
  70. data/lib/geoblacklight/metadata_transformer/base.rb +5 -4
  71. data/lib/geoblacklight/metadata_transformer/fgdc.rb +1 -0
  72. data/lib/geoblacklight/metadata_transformer/iso19139.rb +1 -0
  73. data/lib/geoblacklight/metadata_transformer.rb +6 -2
  74. data/lib/geoblacklight/reference.rb +3 -2
  75. data/lib/geoblacklight/references.rb +12 -7
  76. data/lib/geoblacklight/relation/ancestors.rb +4 -3
  77. data/lib/geoblacklight/relation/descendants.rb +4 -3
  78. data/lib/geoblacklight/relation/relation_response.rb +3 -2
  79. data/lib/geoblacklight/routes/downloadable.rb +3 -2
  80. data/lib/geoblacklight/routes/exportable.rb +4 -3
  81. data/lib/geoblacklight/routes/wms.rb +2 -1
  82. data/lib/geoblacklight/routes.rb +4 -3
  83. data/lib/geoblacklight/version.rb +2 -1
  84. data/lib/geoblacklight/view_helper_override.rb +3 -2
  85. data/lib/geoblacklight/wms_layer/feature_info_response.rb +5 -4
  86. data/lib/geoblacklight/wms_layer.rb +4 -3
  87. data/lib/geoblacklight.rb +32 -31
  88. data/lib/tasks/geoblacklight.rake +45 -44
  89. data/schema/geoblacklight-schema-aardvark.json +6 -0
  90. data/spec/components/geoblacklight/display_note_component_spec.rb +27 -0
  91. data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +11 -10
  92. data/spec/components/geoblacklight/icon_facet_item_component_spec.rb +8 -7
  93. data/spec/config/initializers/rails_config_spec.rb +10 -9
  94. data/spec/controllers/catalog_controller_spec.rb +27 -26
  95. data/spec/controllers/download_controller_spec.rb +50 -49
  96. data/spec/controllers/relation_controller_spec.rb +5 -4
  97. data/spec/controllers/wms_controller_spec.rb +10 -9
  98. data/spec/factories/user.rb +3 -2
  99. data/spec/features/bookmarks_spec.rb +7 -6
  100. data/spec/features/citations_spec.rb +12 -0
  101. data/spec/features/configurable_basemap_spec.rb +12 -11
  102. data/spec/features/data_dictionary_download_spec.rb +11 -10
  103. data/spec/features/download_layer_spec.rb +64 -63
  104. data/spec/features/empty_search_spec.rb +6 -5
  105. data/spec/features/esri_viewer_spec.rb +33 -32
  106. data/spec/features/exports_spec.rb +18 -17
  107. data/spec/features/full_screen_controll_spec.rb +8 -8
  108. data/spec/features/help_text_spec.rb +6 -5
  109. data/spec/features/home_page_spec.rb +30 -29
  110. data/spec/features/iiif_viewer_spec.rb +6 -5
  111. data/spec/features/index_map_spec.rb +17 -16
  112. data/spec/features/layer_inspection_spec.rb +8 -7
  113. data/spec/features/layer_opacity_spec.rb +15 -14
  114. data/spec/features/layer_preview_spec.rb +11 -10
  115. data/spec/features/layer_with_no_references_spec.rb +5 -4
  116. data/spec/features/linkified_attribute_table_spec.rb +8 -7
  117. data/spec/features/metadata_panel_spec.rb +32 -31
  118. data/spec/features/missing_metadata_spec.rb +18 -17
  119. data/spec/features/multiple_downloads_spec.rb +11 -10
  120. data/spec/features/oembed_spec.rb +6 -5
  121. data/spec/features/relations_spec.rb +51 -26
  122. data/spec/features/saved_searches_spec.rb +7 -6
  123. data/spec/features/search_bar_spec.rb +9 -8
  124. data/spec/features/search_results_complex_geometry_spec.rb +12 -11
  125. data/spec/features/search_results_icons_spec.rb +10 -9
  126. data/spec/features/search_results_map_spec.rb +21 -20
  127. data/spec/features/search_results_overlap_ratio_spec.rb +17 -16
  128. data/spec/features/search_spec.rb +19 -18
  129. data/spec/features/show_page_download_spec.rb +15 -14
  130. data/spec/features/show_page_metadata_spec.rb +9 -8
  131. data/spec/features/show_page_sidebar_static_map_spec.rb +21 -0
  132. data/spec/features/sms_spec.rb +12 -11
  133. data/spec/features/split_view.html.erb_spec.rb +56 -55
  134. data/spec/features/suppressed_records_spec.rb +10 -9
  135. data/spec/features/tilejson_spec.rb +12 -9
  136. data/spec/features/tms_spec.rb +6 -5
  137. data/spec/features/web_services_modal_spec.rb +39 -38
  138. data/spec/features/wmts_spec.rb +20 -17
  139. data/spec/features/xyz_spec.rb +6 -5
  140. data/spec/fixtures/manifests/tilejson.json +1 -1
  141. data/spec/fixtures/manifests/wmts-single.xml +5 -5
  142. data/spec/fixtures/solr_documents/actual-papermap1.json +1 -1
  143. data/spec/fixtures/solr_documents/actual-point1.json +1 -1
  144. data/spec/fixtures/solr_documents/actual-polygon1.json +1 -1
  145. data/spec/fixtures/solr_documents/actual-raster1.json +1 -1
  146. data/spec/fixtures/solr_documents/baruch_ancestor1.json +1 -1
  147. data/spec/fixtures/solr_documents/baruch_ancestor2.json +1 -1
  148. data/spec/fixtures/solr_documents/baruch_documentation_download.json +2 -2
  149. data/spec/fixtures/solr_documents/cornell_html_metadata.json +1 -1
  150. data/spec/fixtures/solr_documents/display-note.json +52 -0
  151. data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +1 -1
  152. data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +1 -1
  153. data/spec/fixtures/solr_documents/esri-feature-layer.json +1 -1
  154. data/spec/fixtures/solr_documents/esri-image-map-layer.json +1 -1
  155. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +1 -1
  156. data/spec/fixtures/solr_documents/esri-wms-layer.json +1 -1
  157. data/spec/fixtures/solr_documents/harvard_raster.json +1 -1
  158. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +1 -1
  159. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +1 -1
  160. data/spec/fixtures/solr_documents/index-map-polygon.json +1 -1
  161. data/spec/fixtures/solr_documents/index-map-stanford.json +1 -1
  162. data/spec/fixtures/solr_documents/index_map_point.json +1 -1
  163. data/spec/fixtures/solr_documents/princeton-parent.json +1 -1
  164. data/spec/fixtures/solr_documents/public_direct_download.json +1 -1
  165. data/spec/fixtures/solr_documents/public_iiif_princeton.json +1 -1
  166. data/spec/fixtures/solr_documents/restricted-line.json +1 -1
  167. data/spec/fixtures/solr_documents/tilejson.json +3 -3
  168. data/spec/fixtures/solr_documents/umn_metro_result1.json +2 -2
  169. data/spec/fixtures/solr_documents/umn_state_result1.json +1 -1
  170. data/spec/fixtures/solr_documents/umn_state_result2.json +1 -1
  171. data/spec/fixtures/solr_documents/uva_slug_colon.json +1 -1
  172. data/spec/fixtures/solr_documents/wmts-multiple.json +1 -1
  173. data/spec/fixtures/solr_documents/wmts-single-layer.json +7 -7
  174. data/spec/fixtures/solr_documents/xyz.json +3 -3
  175. data/spec/helpers/arcgis_helper_spec.rb +8 -7
  176. data/spec/helpers/carto_helper_spec.rb +6 -5
  177. data/spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb +10 -15
  178. data/spec/helpers/geoblacklight_helper_spec.rb +139 -138
  179. data/spec/lib/geoblacklight/bounding_box_spec.rb +14 -13
  180. data/spec/lib/geoblacklight/document_presenter_spec.rb +26 -25
  181. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +8 -7
  182. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +8 -7
  183. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +16 -15
  184. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +9 -8
  185. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +8 -7
  186. data/spec/lib/geoblacklight/download_spec.rb +61 -60
  187. data/spec/lib/geoblacklight/geometry_spec.rb +29 -28
  188. data/spec/lib/geoblacklight/item_viewer_spec.rb +25 -24
  189. data/spec/lib/geoblacklight/metadata/base_spec.rb +44 -43
  190. data/spec/lib/geoblacklight/metadata/html_spec.rb +7 -6
  191. data/spec/lib/geoblacklight/metadata_spec.rb +15 -14
  192. data/spec/lib/geoblacklight/metadata_transformer/base_spec.rb +13 -12
  193. data/spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb +8 -7
  194. data/spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb +8 -7
  195. data/spec/lib/geoblacklight/metadata_transformer_spec.rb +15 -14
  196. data/spec/lib/geoblacklight/reference_spec.rb +28 -27
  197. data/spec/lib/geoblacklight/references_spec.rb +89 -76
  198. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +17 -16
  199. data/spec/lib/geoblacklight/relation/descendants_spec.rb +17 -16
  200. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +29 -28
  201. data/spec/lib/geoblacklight/view_helper_override_spec.rb +14 -13
  202. data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +19 -18
  203. data/spec/lib/geoblacklight/wms_layer_spec.rb +31 -30
  204. data/spec/models/concerns/geoblacklight/bbox_filter_field_spec.rb +31 -31
  205. data/spec/models/concerns/geoblacklight/bbox_filter_query_spec.rb +32 -32
  206. data/spec/models/concerns/geoblacklight/solr_document/carto_spec.rb +16 -15
  207. data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +7 -6
  208. data/spec/models/concerns/geoblacklight/solr_document/finder_spec.rb +16 -17
  209. data/spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb +7 -6
  210. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +121 -107
  211. data/spec/models/concerns/geoblacklight/suppressed_records_search_behavior_spec.rb +8 -7
  212. data/spec/presenters/geoblacklight/bbox_item_presenter_spec.rb +10 -10
  213. data/spec/routing/catalog_routing_spec.rb +4 -3
  214. data/spec/spec_helper.rb +35 -38
  215. data/spec/support/backport_test_helpers.rb +6 -5
  216. data/spec/support/features/session_helpers.rb +8 -7
  217. data/spec/support/features.rb +2 -1
  218. data/spec/support/fixtures.rb +2 -1
  219. data/spec/tasks/geoblacklight_spec.rb +10 -9
  220. data/spec/test_app_templates/lib/generators/test_app_generator.rb +16 -15
  221. data/spec/views/catalog/_document_split.html.erb_spec.rb +3 -2
  222. data/spec/views/catalog/_index_split.html.erb_spec.rb +3 -2
  223. data/spec/views/catalog/_results_pagination.html.erb_spec.rb +5 -4
  224. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +11 -10
  225. data/spec/views/catalog/_show_tools.html.erb_spec.rb +13 -12
  226. data/template.rb +9 -8
  227. metadata +40 -216
  228. data/.gitmodules +0 -0
  229. data/.rubocop.yml +0 -111
  230. data/.rubocop_todo.yml +0 -437
  231. data/config/initializers/new_gbl_settings_defaults_3_4.yml +0 -6
  232. /data/app/assets/images/blacklight/{berkeley.svg → university-of-california-berkeley.svg} +0 -0
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
- require 'spec_helper'
2
+
3
+ require "spec_helper"
3
4
 
4
5
  describe Geoblacklight::References do
5
6
  let(:references_field) { Settings.FIELDS.REFERENCES }
@@ -7,10 +8,10 @@ describe Geoblacklight::References do
7
8
  let(:typical_ogp_shapefile) do
8
9
  described_class.new(
9
10
  SolrDocument.new(
10
- file_format_field => 'Shapefile',
11
+ file_format_field => "Shapefile",
11
12
  references_field => {
12
- 'http://www.opengis.net/def/serviceType/ogc/wms' => 'http://hgl.harvard.edu:8080/geoserver/wms',
13
- 'http://www.opengis.net/def/serviceType/ogc/wfs' => 'http://hgl.harvard.edu:8080/geoserver/wfs'
13
+ "http://www.opengis.net/def/serviceType/ogc/wms" => "http://hgl.harvard.edu:8080/geoserver/wms",
14
+ "http://www.opengis.net/def/serviceType/ogc/wfs" => "http://hgl.harvard.edu:8080/geoserver/wfs"
14
15
  }.to_json
15
16
  )
16
17
  )
@@ -18,7 +19,7 @@ describe Geoblacklight::References do
18
19
  let(:no_service_shapefile) do
19
20
  described_class.new(
20
21
  SolrDocument.new(
21
- file_format_field => 'Shapefile',
22
+ file_format_field => "Shapefile",
22
23
  references_field => {}.to_json
23
24
  )
24
25
  )
@@ -26,10 +27,10 @@ describe Geoblacklight::References do
26
27
  let(:typical_ogp_geotiff) do
27
28
  described_class.new(
28
29
  SolrDocument.new(
29
- file_format_field => 'GeoTIFF',
30
+ file_format_field => "GeoTIFF",
30
31
  references_field => {
31
- 'http://www.opengis.net/def/serviceType/ogc/wms' => 'http://hgl.harvard.edu:8080/geoserver/wms',
32
- 'http://www.opengis.net/def/serviceType/ogc/wfs' => 'http://hgl.harvard.edu:8080/geoserver/wfs'
32
+ "http://www.opengis.net/def/serviceType/ogc/wms" => "http://hgl.harvard.edu:8080/geoserver/wms",
33
+ "http://www.opengis.net/def/serviceType/ogc/wfs" => "http://hgl.harvard.edu:8080/geoserver/wfs"
33
34
  }.to_json
34
35
  )
35
36
  )
@@ -37,10 +38,10 @@ describe Geoblacklight::References do
37
38
  let(:typical_arcgrid) do
38
39
  described_class.new(
39
40
  SolrDocument.new(
40
- file_format_field => 'ArcGRID',
41
+ file_format_field => "ArcGRID",
41
42
  references_field => {
42
- 'http://www.opengis.net/def/serviceType/ogc/wms' => 'http://hgl.harvard.edu:8080/geoserver/wms',
43
- 'http://www.opengis.net/def/serviceType/ogc/wfs' => 'http://hgl.harvard.edu:8080/geoserver/wfs'
43
+ "http://www.opengis.net/def/serviceType/ogc/wms" => "http://hgl.harvard.edu:8080/geoserver/wms",
44
+ "http://www.opengis.net/def/serviceType/ogc/wfs" => "http://hgl.harvard.edu:8080/geoserver/wfs"
44
45
  }.to_json
45
46
  )
46
47
  )
@@ -48,14 +49,14 @@ describe Geoblacklight::References do
48
49
  let(:complex_shapefile) do
49
50
  described_class.new(
50
51
  SolrDocument.new(
51
- file_format_field => 'Shapefile',
52
+ file_format_field => "Shapefile",
52
53
  references_field => {
53
- 'http://schema.org/downloadUrl' => 'http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip',
54
- 'http://www.isotc211.org/schemas/2005/gmd/' => 'http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/iso19139.xml',
55
- 'http://www.loc.gov/mods/v3' => 'http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/mods.xml',
56
- 'http://schema.org/url' => 'http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/homepage',
57
- 'http://www.opengis.net/def/serviceType/ogc/wms' => 'http://hgl.harvard.edu:8080/geoserver/wms',
58
- 'http://www.opengis.net/def/serviceType/ogc/wfs' => 'http://hgl.harvard.edu:8080/geoserver/wfs'
54
+ "http://schema.org/downloadUrl" => "http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip",
55
+ "http://www.isotc211.org/schemas/2005/gmd/" => "http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/iso19139.xml",
56
+ "http://www.loc.gov/mods/v3" => "http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/mods.xml",
57
+ "http://schema.org/url" => "http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/homepage",
58
+ "http://www.opengis.net/def/serviceType/ogc/wms" => "http://hgl.harvard.edu:8080/geoserver/wms",
59
+ "http://www.opengis.net/def/serviceType/ogc/wfs" => "http://hgl.harvard.edu:8080/geoserver/wfs"
59
60
  }.to_json
60
61
  )
61
62
  )
@@ -63,9 +64,9 @@ describe Geoblacklight::References do
63
64
  let(:direct_download_only) do
64
65
  described_class.new(
65
66
  SolrDocument.new(
66
- file_format_field => 'GeoTIFF',
67
+ file_format_field => "GeoTIFF",
67
68
  references_field => {
68
- 'http://schema.org/downloadUrl' => 'http://example.com/layer-id-geotiff.tiff'
69
+ "http://schema.org/downloadUrl" => "http://example.com/layer-id-geotiff.tiff"
69
70
  }.to_json
70
71
  )
71
72
  )
@@ -73,10 +74,10 @@ describe Geoblacklight::References do
73
74
  let(:simple_iiif_image) do
74
75
  described_class.new(
75
76
  SolrDocument.new(
76
- file_format_field => 'Raster',
77
+ file_format_field => "Raster",
77
78
  references_field => {
78
- 'http://schema.org/url' => 'http://arks.princeton.edu/ark:/88435/02870w62c',
79
- 'http://iiif.io/api/image' => 'https://iiif-cloud.princeton.edu/iiif/2/6c%2F52%2F12%2F6c5212e81bc845f59bb1cdc740a88bad%2Fintermediate_file/info.json'
79
+ "http://schema.org/url" => "http://arks.princeton.edu/ark:/88435/02870w62c",
80
+ "http://iiif.io/api/image" => "https://iiif-cloud.princeton.edu/iiif/2/6c%2F52%2F12%2F6c5212e81bc845f59bb1cdc740a88bad%2Fintermediate_file/info.json"
80
81
  }.to_json
81
82
  )
82
83
  )
@@ -85,10 +86,10 @@ describe Geoblacklight::References do
85
86
  described_class.new(
86
87
  SolrDocument.new(
87
88
  references_field => {
88
- 'urn:x-esri:serviceType:ArcGIS#NotValid' => 'foo',
89
- 'urn:x-esri:serviceType:ArcGIS#TiledMapLayer' => 'foo',
90
- 'urn:x-esri:serviceType:ArcGIS#DynamicMapLayer' => 'foo',
91
- 'urn:x-esri:serviceType:ArcGIS#ImageMapLayer' => 'foo'
89
+ "urn:x-esri:serviceType:ArcGIS#NotValid" => "foo",
90
+ "urn:x-esri:serviceType:ArcGIS#TiledMapLayer" => "foo",
91
+ "urn:x-esri:serviceType:ArcGIS#DynamicMapLayer" => "foo",
92
+ "urn:x-esri:serviceType:ArcGIS#ImageMapLayer" => "foo"
92
93
  }.to_json
93
94
  )
94
95
  )
@@ -98,119 +99,131 @@ describe Geoblacklight::References do
98
99
  SolrDocument.new, :new_ref_field
99
100
  )
100
101
  end
101
- describe '#initialize' do
102
- it 'parses configured references field to @refs' do
102
+ describe "#initialize" do
103
+ it "parses configured references field to @refs" do
103
104
  expect(typical_ogp_shapefile.instance_variable_get(:@refs)).to be_an Array
104
105
  end
105
- it 'empty references return an empty array' do
106
+ it "empty references return an empty array" do
106
107
  empty_refs = no_service_shapefile.instance_variable_get(:@refs)
107
108
  expect(empty_refs).to be_an Array
108
109
  expect(empty_refs).to eq []
109
110
  end
110
- it 'sets @references_field' do
111
+ it "sets @references_field" do
111
112
  expect(typical_ogp_shapefile.reference_field).to eq references_field
112
113
  expect(custom_fields.reference_field).to eq :new_ref_field
113
114
  end
114
115
  end
115
- describe 'format' do
116
- it 'returns format' do
117
- expect(complex_shapefile.format).to eq 'Shapefile'
118
- expect(direct_download_only.format).to eq 'GeoTIFF'
116
+ describe "format" do
117
+ it "returns format" do
118
+ expect(complex_shapefile.format).to eq "Shapefile"
119
+ expect(direct_download_only.format).to eq "GeoTIFF"
119
120
  end
120
121
  end
121
- describe 'refs' do
122
- it 'is a set of enumberable references' do
122
+ describe "refs" do
123
+ it "is a set of enumberable references" do
123
124
  complex_shapefile.refs.each do |reference|
124
125
  expect(reference).to be_an Geoblacklight::Reference
125
126
  end
126
127
  end
127
128
  end
128
- describe 'shown_metadata_refs' do
129
- it 'is a set of metadata references exposed by the configuration' do
129
+ describe "shown_metadata_refs" do
130
+ it "is a set of metadata references exposed by the configuration" do
130
131
  expect(complex_shapefile.shown_metadata_refs.count).to eq 2
131
- expect(complex_shapefile.shown_metadata_refs.first.type.to_s).to eq 'mods'
132
- expect(complex_shapefile.shown_metadata_refs.last.type.to_s).to eq 'iso19139'
132
+ expect(complex_shapefile.shown_metadata_refs.first.type.to_s).to eq "mods"
133
+ expect(complex_shapefile.shown_metadata_refs.last.type.to_s).to eq "iso19139"
133
134
  end
134
- context 'with an overridden order for the formats' do
135
+ context "with an overridden order for the formats" do
135
136
  before do
136
- stub_const('Settings', Module.new)
137
+ stub_const("Settings", Module.new)
137
138
  allow(Settings).to receive_messages(
138
139
  METADATA_SHOWN: %w[iso19139 mods],
139
- FIELDS: OpenStruct.new(FORMAT: 'dct_format_s')
140
+ FIELDS: OpenStruct.new(FORMAT: "dct_format_s")
140
141
  )
141
142
  end
142
- it 'is ordered by the configuration' do
143
- expect(complex_shapefile.shown_metadata_refs.first.type.to_s).to eq 'iso19139'
144
- expect(complex_shapefile.shown_metadata_refs.last.type.to_s).to eq 'mods'
143
+ it "is ordered by the configuration" do
144
+ expect(complex_shapefile.shown_metadata_refs.first.type.to_s).to eq "iso19139"
145
+ expect(complex_shapefile.shown_metadata_refs.last.type.to_s).to eq "mods"
145
146
  end
146
147
  end
147
148
  end
148
- describe 'shown_metadata' do
149
- it 'is a set of metadata resources exposed by the configuration' do
149
+ describe "shown_metadata" do
150
+ it "is a set of metadata resources exposed by the configuration" do
150
151
  expect(complex_shapefile.shown_metadata.count).to eq 2
151
152
  expect(complex_shapefile.shown_metadata.first).to be_a Geoblacklight::Metadata::Base
152
153
  end
153
154
  end
154
- describe 'direct_download' do
155
- it 'returns the direct download link' do
155
+ describe "direct_download" do
156
+ it "returns the direct download link" do
156
157
  download = complex_shapefile.download
157
158
  expect(download).to be_an Geoblacklight::Reference
158
- expect(download.endpoint).to eq('http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip')
159
- expect(direct_download_only.download.endpoint).to eq 'http://example.com/layer-id-geotiff.tiff'
159
+ expect(download.endpoint).to eq("http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip")
160
+ expect(direct_download_only.download.endpoint).to eq "http://example.com/layer-id-geotiff.tiff"
160
161
  end
161
- it 'does not return if download not available' do
162
+ it "does not return if download not available" do
162
163
  expect(typical_ogp_shapefile.download).to be_nil
163
164
  end
164
165
  end
165
- describe 'preferred_download' do
166
- it 'returns the direct download if available' do
167
- expect(complex_shapefile.preferred_download[:file_download][:download]).to eq 'http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip'
168
- expect(direct_download_only.preferred_download[:file_download][:download]).to eq 'http://example.com/layer-id-geotiff.tiff'
166
+ describe "preferred_download" do
167
+ it "returns the direct download if available" do
168
+ expect(complex_shapefile.preferred_download[:file_download][:download]).to eq "http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip"
169
+ expect(direct_download_only.preferred_download[:file_download][:download]).to eq "http://example.com/layer-id-geotiff.tiff"
169
170
  end
170
- it 'returns nil if there is no direct download' do
171
+ it "returns nil if there is no direct download" do
171
172
  expect(typical_ogp_shapefile.preferred_download).to be_nil
172
173
  expect(typical_ogp_geotiff.preferred_download).to be_nil
173
174
  end
174
175
  end
175
- describe 'download_types' do
176
- it 'returns available downloads by format' do
176
+ describe "download_types" do
177
+ it "returns available downloads by format" do
177
178
  types = complex_shapefile.download_types
178
- expect(types.first[1]).to eq wfs: 'http://hgl.harvard.edu:8080/geoserver/wfs'
179
+ expect(types.first[1]).to eq wfs: "http://hgl.harvard.edu:8080/geoserver/wfs"
179
180
  expect(types.count).to eq 3
180
181
  expect(direct_download_only.download_types).to be_nil
181
182
  end
182
- it 'onlies return available downloads if no direct is present' do
183
+ it "onlies return available downloads if no direct is present" do
183
184
  types = typical_ogp_shapefile.download_types
184
- expect(types.first[1]).to eq wfs: 'http://hgl.harvard.edu:8080/geoserver/wfs'
185
+ expect(types.first[1]).to eq wfs: "http://hgl.harvard.edu:8080/geoserver/wfs"
185
186
  expect(types.count).to eq 3
186
187
  end
187
188
  end
188
- describe '#esri_webservices' do
189
- it 'returns webservices that are esri specific' do
189
+ describe "#esri_webservices" do
190
+ it "returns webservices that are esri specific" do
190
191
  expect(some_esri_services.esri_webservices.length).to eq 3
191
192
  end
192
193
  end
193
- describe '#method_missing' do
194
- it 'defaults to the base behavior if the method signature is not a URI key' do
194
+ describe "#method_missing" do
195
+ it "defaults to the base behavior if the method signature is not a URI key" do
195
196
  expect { typical_ogp_shapefile.invalid }.to raise_error(NoMethodError)
196
197
  end
197
198
  end
198
- describe 'downloads_by_format' do
199
- it 'returns shapefile' do
199
+ describe "#respond_to_missing?" do
200
+ context "with a valid method" do
201
+ it "returns true" do
202
+ expect(typical_ogp_shapefile.respond_to?(:download_types)).to be true
203
+ end
204
+ end
205
+ context "with a invalid method" do
206
+ it "returns false" do
207
+ expect(typical_ogp_shapefile.respond_to?(:invalid)).to be false
208
+ end
209
+ end
210
+ end
211
+ describe "downloads_by_format" do
212
+ it "returns shapefile" do
200
213
  expect(typical_ogp_shapefile.downloads_by_format.count).to eq 3
201
214
  end
202
- it 'returns geotiff' do
215
+ it "returns geotiff" do
203
216
  expect(typical_ogp_geotiff.downloads_by_format.count).to eq 1
204
- expect(typical_ogp_geotiff.downloads_by_format[:geotiff][:wms]).to eq 'http://hgl.harvard.edu:8080/geoserver/wms'
217
+ expect(typical_ogp_geotiff.downloads_by_format[:geotiff][:wms]).to eq "http://hgl.harvard.edu:8080/geoserver/wms"
205
218
  end
206
- it 'returns arcgrid as geotiff' do
219
+ it "returns arcgrid as geotiff" do
207
220
  expect(typical_arcgrid.downloads_by_format.count).to eq 1
208
- expect(typical_arcgrid.downloads_by_format[:geotiff][:wms]).to eq 'http://hgl.harvard.edu:8080/geoserver/wms'
221
+ expect(typical_arcgrid.downloads_by_format[:geotiff][:wms]).to eq "http://hgl.harvard.edu:8080/geoserver/wms"
209
222
  end
210
- it 'does not return shapefile if wms and wfs are not present' do
223
+ it "does not return shapefile if wms and wfs are not present" do
211
224
  expect(no_service_shapefile.downloads_by_format).to be_nil
212
225
  end
213
- it 'does not return GeoTIFF if wms is not present' do
226
+ it "does not return GeoTIFF if wms is not present" do
214
227
  expect(direct_download_only.downloads_by_format).to be_nil
215
228
  end
216
229
  end
@@ -1,33 +1,34 @@
1
1
  # frozen_string_literal: true
2
- require 'spec_helper'
2
+
3
+ require "spec_helper"
3
4
 
4
5
  describe Geoblacklight::Relation::Ancestors do
5
6
  let(:repository) { Blacklight::Solr::Repository.new(CatalogController.blacklight_config) }
6
- let(:ancestors) { described_class.new('nyu_2451_34502', Settings.FIELDS.SOURCE, repository) }
7
- let(:empty_ancestors) { described_class.new('harvard-g7064-s2-1834-k3', Settings.FIELDS.SOURCE, repository) }
7
+ let(:ancestors) { described_class.new("nyu_2451_34502", Settings.FIELDS.SOURCE, repository) }
8
+ let(:empty_ancestors) { described_class.new("harvard-g7064-s2-1834-k3", Settings.FIELDS.SOURCE, repository) }
8
9
 
9
- describe '#create_search_params' do
10
- it 'assembles the correct search params for finding ancestor documents' do
10
+ describe "#create_search_params" do
11
+ it "assembles the correct search params for finding ancestor documents" do
11
12
  expect(ancestors.create_search_params).to eq(fq: ["{!join from=#{Settings.FIELDS.SOURCE} to=#{Settings.FIELDS.ID}}#{Settings.FIELDS.ID}:nyu_2451_34502"], fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.ID, Settings.FIELDS.RESOURCE_TYPE])
12
13
  end
13
14
  end
14
15
 
15
- describe '#execute_query' do
16
- it 'executes the query for finding ancestors, return response' do
17
- expect(ancestors.execute_query).to include('responseHeader')
16
+ describe "#execute_query" do
17
+ it "executes the query for finding ancestors, return response" do
18
+ expect(ancestors.execute_query).to include("responseHeader")
18
19
  end
19
20
  end
20
21
 
21
- describe '#results' do
22
- it 'produces a hash of results from the query' do
23
- expect(ancestors.results).to include('numFound')
24
- expect(ancestors.results).to include('docs')
22
+ describe "#results" do
23
+ it "produces a hash of results from the query" do
24
+ expect(ancestors.results).to include("numFound")
25
+ expect(ancestors.results).to include("docs")
25
26
  end
26
- it 'has non-zero numfound for a document with ancestors' do
27
- expect(ancestors.results['numFound']).to be > 0
27
+ it "has non-zero numfound for a document with ancestors" do
28
+ expect(ancestors.results["numFound"]).to be > 0
28
29
  end
29
- it 'has zero numfound for a document without ancestors' do
30
- expect(empty_ancestors.results['numFound']).to eq(0)
30
+ it "has zero numfound for a document without ancestors" do
31
+ expect(empty_ancestors.results["numFound"]).to eq(0)
31
32
  end
32
33
  end
33
34
  end
@@ -1,33 +1,34 @@
1
1
  # frozen_string_literal: true
2
- require 'spec_helper'
2
+
3
+ require "spec_helper"
3
4
 
4
5
  describe Geoblacklight::Relation::Descendants do
5
6
  let(:repository) { Blacklight::Solr::Repository.new(CatalogController.blacklight_config) }
6
- let(:descendants) { described_class.new('nyu_2451_34636', Settings.FIELDS.SOURCE, repository) }
7
- let(:empty_descendants) { described_class.new('harvard-g7064-s2-1834-k3', Settings.FIELDS.SOURCE, repository) }
7
+ let(:descendants) { described_class.new("nyu_2451_34636", Settings.FIELDS.SOURCE, repository) }
8
+ let(:empty_descendants) { described_class.new("harvard-g7064-s2-1834-k3", Settings.FIELDS.SOURCE, repository) }
8
9
 
9
- describe '#create_search_params' do
10
- it 'assembles the correct search params for finding descendant documents' do
10
+ describe "#create_search_params" do
11
+ it "assembles the correct search params for finding descendant documents" do
11
12
  expect(descendants.create_search_params).to eq(fq: "#{Settings.FIELDS.SOURCE}:nyu_2451_34636", fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.ID, Settings.FIELDS.RESOURCE_TYPE])
12
13
  end
13
14
  end
14
15
 
15
- describe '#execute_query' do
16
- it 'executes the query for finding descendants, return response' do
17
- expect(descendants.execute_query).to include('responseHeader')
16
+ describe "#execute_query" do
17
+ it "executes the query for finding descendants, return response" do
18
+ expect(descendants.execute_query).to include("responseHeader")
18
19
  end
19
20
  end
20
21
 
21
- describe '#results' do
22
- it 'produces a hash of results from the query' do
23
- expect(descendants.results).to include('numFound')
24
- expect(descendants.results).to include('docs')
22
+ describe "#results" do
23
+ it "produces a hash of results from the query" do
24
+ expect(descendants.results).to include("numFound")
25
+ expect(descendants.results).to include("docs")
25
26
  end
26
- it 'has non-zero numfound for a document with descendants' do
27
- expect(descendants.results['numFound']).to be > 0
27
+ it "has non-zero numfound for a document with descendants" do
28
+ expect(descendants.results["numFound"]).to be > 0
28
29
  end
29
- it 'has zero numfound for a document without descendants' do
30
- expect(empty_descendants.results['numFound']).to eq(0)
30
+ it "has zero numfound for a document without descendants" do
31
+ expect(empty_descendants.results["numFound"]).to eq(0)
31
32
  end
32
33
  end
33
34
  end
@@ -1,58 +1,59 @@
1
1
  # frozen_string_literal: true
2
- require 'spec_helper'
2
+
3
+ require "spec_helper"
3
4
 
4
5
  describe Geoblacklight::Relation::RelationResponse do
5
6
  let(:repository) { Blacklight::Solr::Repository.new(CatalogController.blacklight_config) }
6
- let(:relation_resp) { described_class.new('nyu_2451_34502', repository) }
7
- let(:empty_relation_resp) { described_class.new('harvard-g7064-s2-1834-k3', repository) }
8
- describe '#initialize' do
9
- it 'creates a RelationResponse' do
7
+ let(:relation_resp) { described_class.new("nyu_2451_34502", repository) }
8
+ let(:empty_relation_resp) { described_class.new("harvard-g7064-s2-1834-k3", repository) }
9
+ describe "#initialize" do
10
+ it "creates a RelationResponse" do
10
11
  expect(relation_resp).to be_an described_class
11
12
  end
12
13
  end
13
14
 
14
- describe '#method_missing' do
15
- it 'returns a hash of ancestor documents' do
16
- expect(relation_resp.SOURCE_ANCESTORS).to include('numFound')
17
- expect(relation_resp.SOURCE_ANCESTORS).to include('docs')
15
+ describe "#method_missing" do
16
+ it "returns a hash of ancestor documents" do
17
+ expect(relation_resp.SOURCE_ANCESTORS).to include("numFound")
18
+ expect(relation_resp.SOURCE_ANCESTORS).to include("docs")
18
19
  end
19
20
 
20
- it 'returns a hash of descendant documents' do
21
- expect(relation_resp.SOURCE_DESCENDANTS).to include('numFound')
22
- expect(relation_resp.SOURCE_DESCENDANTS).to include('docs')
21
+ it "returns a hash of descendant documents" do
22
+ expect(relation_resp.SOURCE_DESCENDANTS).to include("numFound")
23
+ expect(relation_resp.SOURCE_DESCENDANTS).to include("docs")
23
24
  end
24
25
 
25
- it 'raises no method error' do
26
+ it "raises no method error" do
26
27
  expect { relation_resp.FAIL }.to raise_error NoMethodError
27
28
  end
28
29
  end
29
30
 
30
- describe '#respond_to_missing?' do
31
- it 'returns true for configured relationships' do
31
+ describe "#respond_to_missing?" do
32
+ it "returns true for configured relationships" do
32
33
  Settings.RELATIONSHIPS_SHOWN.each_key do |key|
33
34
  expect(relation_resp).to respond_to(key)
34
35
  end
35
36
  end
36
37
 
37
- it 'returns false for non-configured options' do
38
- expect(relation_resp).not_to respond_to('fail')
38
+ it "returns false for non-configured options" do
39
+ expect(relation_resp).not_to respond_to("fail")
39
40
  end
40
41
  end
41
42
 
42
- describe '#query_type' do
43
- it 'fails for a bad query type request' do
43
+ describe "#query_type" do
44
+ it "fails for a bad query type request" do
44
45
  # Cache the existing relationship values and add a test value
45
46
  relationships = Settings.RELATIONSHIPS_SHOWN
46
47
  Settings.add_source!({
47
- RELATIONSHIPS_SHOWN: {
48
- BAD: {
49
- field: 'dct_source_sm',
50
- query_type: 'bad_query_type',
51
- icon: 'pagelines-brands',
52
- label: 'geoblacklight.relations.ancestor'
53
- }
54
- }
55
- })
48
+ RELATIONSHIPS_SHOWN: {
49
+ BAD: {
50
+ field: "dct_source_sm",
51
+ query_type: "bad_query_type",
52
+ icon: "pagelines-brands",
53
+ label: "geoblacklight.relations.source_ancestor"
54
+ }
55
+ }
56
+ })
56
57
  Settings.reload!
57
58
 
58
59
  expect { relation_resp.BAD }.to raise_error(ArgumentError)
@@ -1,25 +1,26 @@
1
1
  # frozen_string_literal: true
2
- require 'spec_helper'
3
2
 
4
- describe Geoblacklight::ViewHelperOverride do
5
- class GeoblacklightControllerTestClass
6
- include AbstractController::Translation
7
- attr_accessor :params
8
- end
3
+ require "spec_helper"
9
4
 
5
+ class GeoblacklightControllerTestClass
6
+ include AbstractController::Translation
7
+ attr_accessor :params
8
+ end
9
+
10
+ describe Geoblacklight::ViewHelperOverride do
10
11
  let(:fake_controller) do
11
12
  GeoblacklightControllerTestClass.new
12
- .extend(described_class)
13
+ .extend(described_class)
13
14
  end
14
15
 
15
- describe 'render_search_to_s_bbox' do
16
- it 'returns an empty string for no bbox' do
16
+ describe "render_search_to_s_bbox" do
17
+ it "returns an empty string for no bbox" do
17
18
  fake_controller.params = {}
18
- expect(fake_controller.render_search_to_s_bbox(fake_controller.params)).to eq ''
19
+ expect(fake_controller.render_search_to_s_bbox(fake_controller.params)).to eq ""
19
20
  end
20
- it 'returns render_search_to_s_element when bbox is present' do
21
- fake_controller.params = { bbox: '123' }
22
- params = { 'bbox' => '123' }
21
+ it "returns render_search_to_s_element when bbox is present" do
22
+ fake_controller.params = {bbox: "123"}
23
+ params = {"bbox" => "123"}
23
24
  expect(fake_controller).to receive(:render_search_to_s_element)
24
25
  expect(fake_controller).to receive(:render_filter_value)
25
26
  fake_controller.render_search_to_s_bbox(params)
@@ -1,38 +1,39 @@
1
1
  # frozen_string_literal: true
2
- require 'spec_helper'
2
+
3
+ require "spec_helper"
3
4
 
4
5
  describe Geoblacklight::FeatureInfoResponse do
5
- let(:response) { described_class.new(OpenStruct.new(body: '<html><body><table><th>Header1</th><th>Header2</th><td>value1</td><td>value2</td></body></html>', headers: { 'content-type' => 'all good' })) }
6
- let(:response_multiple_features) { described_class.new(OpenStruct.new(body: '<html><body><table><th>Header1</th><th>Header2</th><tr><td>value1</td><td>value2</td></tr><tr><td>value3</td><td>value4</td></tr></body></html>', headers: { 'content-type' => 'all good' })) }
7
- let(:error_response) { described_class.new(error: 'bad stuff') }
8
- let(:content_response) { described_class.new(OpenStruct.new(headers: { 'content-type' => 'text/xml' })) }
6
+ let(:response) { described_class.new(OpenStruct.new(body: "<html><body><table><th>Header1</th><th>Header2</th><td>value1</td><td>value2</td></body></html>", headers: {"content-type" => "all good"})) }
7
+ let(:response_multiple_features) { described_class.new(OpenStruct.new(body: "<html><body><table><th>Header1</th><th>Header2</th><tr><td>value1</td><td>value2</td></tr><tr><td>value3</td><td>value4</td></tr></body></html>", headers: {"content-type" => "all good"})) }
8
+ let(:error_response) { described_class.new(error: "bad stuff") }
9
+ let(:content_response) { described_class.new(OpenStruct.new(headers: {"content-type" => "text/xml"})) }
9
10
 
10
- describe '#initialize' do
11
- it 'initializes as a FeatureInfoResponse type' do
11
+ describe "#initialize" do
12
+ it "initializes as a FeatureInfoResponse type" do
12
13
  expect(response).to be_an described_class
13
14
  end
14
15
  end
15
16
 
16
- describe '#error?' do
17
- it 'if no error' do
17
+ describe "#error?" do
18
+ it "if no error" do
18
19
  expect(response.error?).to be_falsey
19
20
  end
20
- it 'if error key is present' do
21
+ it "if error key is present" do
21
22
  expect(error_response.error?).to be_truthy
22
23
  end
23
- it 'if content-type header is text/xml' do
24
+ it "if content-type header is text/xml" do
24
25
  expect(content_response.error?).to be_truthy
25
26
  end
26
27
  end
27
28
 
28
- describe '#format' do
29
- it 'returns a formated response' do
29
+ describe "#format" do
30
+ it "returns a formated response" do
30
31
  expect(response.format).not_to be_nil
31
32
  expect(response.format[:values].length).to eq 2
32
33
  expect(response.format[:values][0]).to eq %w[Header1 value1]
33
34
  expect(response.format[:values][1]).to eq %w[Header2 value2]
34
35
  end
35
- it 'returns a formated response when multiple features are retrieved' do
36
+ it "returns a formated response when multiple features are retrieved" do
36
37
  expect(response_multiple_features.format).not_to be_nil
37
38
  expect(response_multiple_features.format[:values].length).to eq 2
38
39
  expect(response_multiple_features.format[:values][0]).to eq %w[Header1 value1]
@@ -40,12 +41,12 @@ describe Geoblacklight::FeatureInfoResponse do
40
41
  end
41
42
  end
42
43
 
43
- describe '#check' do
44
- it 'returns a formated response if no errors' do
44
+ describe "#check" do
45
+ it "returns a formated response if no errors" do
45
46
  expect(response.check).to eq response.format
46
47
  end
47
- it 'returns the unformated response if there are errors' do
48
- expect(error_response.check).to eq error_response.instance_variable_get('@response')
48
+ it "returns the unformated response if there are errors" do
49
+ expect(error_response.check).to eq error_response.instance_variable_get(:@response)
49
50
  end
50
51
  end
51
52
  end