Fix: Deprecation warnings when running test suite (#2287)
This commit is contained in:
@@ -670,8 +670,8 @@ feature 'Admin budget investments' do
|
||||
filter: :valuation_finished)
|
||||
|
||||
header = page.response_headers['Content-Disposition']
|
||||
header.should match(/^attachment/)
|
||||
header.should match(/filename="budget_investments.csv"$/)
|
||||
expect(header).to match(/^attachment/)
|
||||
expect(header).to match(/filename="budget_investments.csv"$/)
|
||||
|
||||
expect(page).to have_content investment2.title
|
||||
expect(page).to_not have_content investment1.title
|
||||
|
||||
@@ -149,7 +149,7 @@ feature 'Poll Officing' do
|
||||
end
|
||||
|
||||
in_browser(:one) do
|
||||
page.should have_content("Here you can validate user documents and store voting results")
|
||||
expect(page).to have_content("Here you can validate user documents and store voting results")
|
||||
|
||||
visit new_officing_residence_path
|
||||
select 'DNI', from: 'residence_document_type'
|
||||
@@ -162,11 +162,11 @@ feature 'Poll Officing' do
|
||||
expect(Poll::Voter.where(document_number: '12345678Z', poll_id: poll, origin: 'booth', officer_id: officer1).count).to be(1)
|
||||
|
||||
visit final_officing_polls_path
|
||||
page.should have_content("Polls ready for final recounting")
|
||||
expect(page).to have_content("Polls ready for final recounting")
|
||||
end
|
||||
|
||||
in_browser(:two) do
|
||||
page.should have_content("Here you can validate user documents and store voting results")
|
||||
expect(page).to have_content("Here you can validate user documents and store voting results")
|
||||
|
||||
visit new_officing_residence_path
|
||||
select 'DNI', from: 'residence_document_type'
|
||||
@@ -179,7 +179,7 @@ feature 'Poll Officing' do
|
||||
expect(Poll::Voter.where(document_number: '12345678Y', poll_id: poll, origin: 'booth', officer_id: officer2).count).to be(1)
|
||||
|
||||
visit final_officing_polls_path
|
||||
page.should have_content("Polls ready for final recounting")
|
||||
expect(page).to have_content("Polls ready for final recounting")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -29,7 +29,7 @@ feature "Voter" do
|
||||
expect(page).not_to have_link(answer_yes.title)
|
||||
end
|
||||
|
||||
find(:css, ".js-token-message").should be_visible
|
||||
expect(find(:css, ".js-token-message")).to be_visible
|
||||
token = find(:css, ".js-question-answer")[:href].gsub(/.+?(?=token)/, '').gsub('token=', '')
|
||||
|
||||
expect(page).to have_content "You can write down this vote identifier, to check your vote on the final results: #{token}"
|
||||
|
||||
@@ -105,6 +105,8 @@ RSpec.configure do |config|
|
||||
# test failures related to randomization by passing the same `--seed` value
|
||||
# as the one that triggered the failure.
|
||||
Kernel.srand config.seed
|
||||
|
||||
config.expect_with(:rspec) { |c| c.syntax = :expect }
|
||||
end
|
||||
|
||||
# Parallel build helper configuration for travis
|
||||
|
||||
Reference in New Issue
Block a user