-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure that the download button is displayed
This modifies the solr document fixture so that a download button is displayed on the show page. There is a feature test that ensures that the correct URL and the button are on the page. Closes #19
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters