Skip to content

Commit

Permalink
Merge pull request #671 from PecanProject/fix_issue_667
Browse files Browse the repository at this point in the history
Change RSpec test set to work under Ruby 2.6
  • Loading branch information
gsrohde authored Aug 10, 2019
2 parents 5979854 + 9ecdc8f commit ad16618
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion spec/controllers/bulk_upload_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ class BulkUploadController

# TODO: possibly test various kinds of invalid files and what messages result
context "uploading an invalid csv file" do
it "should throw an error and redirect to the start_upload page" do
# This test tests for blank lines in the CSV file, which are no longer
# invalid in Ruby 2.6. So we skip this test but keep it around for
# documentation.
it "should throw an error and redirect to the start_upload page", skip: true do

@file = fixture_file_upload("/files/bulk_upload/invalid_file.csv", "text/csv")
@form = { 'new upload' => true, "CSV file" => @file }
Expand Down
4 changes: 3 additions & 1 deletion spec/features/site_integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
it 'show allow adding new related citations', js: true do
click_link 'View Related Citations'
fill_in 'search_citations', with: 'Wood'
sleep 2 # 1 often isn't enough
# In Ruby 2.6 especially, merely filling in a field doesn't seem to
# trigger the needed keyup event, so do it manually:
find_field('search_citations').trigger(:keyup)
click_link '+'
click_button 'Update'
# reopen related citations listing
Expand Down

0 comments on commit ad16618

Please sign in to comment.