diff --git a/spec/features/download_zip_button_spec.rb b/spec/features/download_zip_button_spec.rb new file mode 100644 index 0000000..34165c8 --- /dev/null +++ b/spec/features/download_zip_button_spec.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true +require 'rails_helper' + +RSpec.describe 'downloading the shapefile as a zip', type: :feature do + let(:download_path) { '/download/gford-20140000-010015_belvegr?type=shapefile' } + let(:page_markup) { page.html.to_s } + before do + Rake::Task['geoblacklight:solr:seed'].invoke + end + scenario 'viewing the download button on the show page' do + visit solr_document_path 'gford-20140000-010015_belvegr' + expect(page).to have_content('Download Shapefile') + expect(page_markup.include?(download_path)).to eq(true) + end +end diff --git a/spec/fixtures/solr_documents/maya_forest.json b/spec/fixtures/solr_documents/maya_forest.json index ec4e697..b2d4c4b 100644 --- a/spec/fixtures/solr_documents/maya_forest.json +++ b/spec/fixtures/solr_documents/maya_forest.json @@ -14,6 +14,7 @@ "dc_subject_sm":"Belize", "dc_creator_sm":"UCSB", "dct_provenance_s": "UCSB", - "layer_geom_type_s": "Polygon" + "layer_geom_type_s": "Mixed", + "dc_format_s":"Shapefile" } ]