Merge pull request #2293 from wairbut-m2c/aperez-fix-deprecation-warnings

Fix for test suite deprecations warnings
This commit is contained in:
BertoCQ
2018-01-15 18:23:42 +01:00
committed by GitHub
10 changed files with 21 additions and 19 deletions

View File

@@ -676,8 +676,8 @@ feature 'Admin budget investments' do
click_link "Download current selection"
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).not_to have_content investment1.title

View File

@@ -46,7 +46,7 @@ feature 'Admin officials' do
fill_in 'name_or_email', with: @citizen.email
click_button 'Search'
expect(page).to have_current_path(search_admin_officials_path, only_path: true)
expect(page).to have_current_path(search_admin_officials_path, ignore_query: true)
expect(page).not_to have_content @official.name
click_link @citizen.name
@@ -71,7 +71,7 @@ feature 'Admin officials' do
click_link "Remove 'Official' status"
expect(page).to have_content 'Details saved: the user is no longer an official'
expect(page).to have_current_path(admin_officials_path, only_path: true)
expect(page).to have_current_path(admin_officials_path, ignore_query: true)
expect(page).not_to have_content @citizen.name
expect(page).not_to have_content @official.name
end

View File

@@ -40,7 +40,7 @@ feature 'Admin::Organizations' do
fill_in "term", with: " "
click_button "Search"
expect(page).to have_current_path(search_admin_organizations_path, only_path: true)
expect(page).to have_current_path(search_admin_organizations_path, ignore_query: true)
within("#search-results") do
expect(page).not_to have_content("Get up, Stand up")
end
@@ -88,13 +88,13 @@ feature 'Admin::Organizations' do
visit admin_organizations_path
within("#organization_#{organization.id}") do
expect(page).to have_current_path(admin_organizations_path, only_path: true)
expect(page).to have_current_path(admin_organizations_path, ignore_query: true)
expect(page).to have_link('Verify')
expect(page).to have_link('Reject')
click_on 'Verify'
end
expect(page).to have_current_path(admin_organizations_path, only_path: true)
expect(page).to have_current_path(admin_organizations_path, ignore_query: true)
expect(page).to have_content 'Verified'
expect(organization.reload.verified?).to eq(true)
@@ -114,7 +114,7 @@ feature 'Admin::Organizations' do
click_on 'Reject'
end
expect(page).to have_current_path(admin_organizations_path, only_path: true)
expect(page).to have_current_path(admin_organizations_path, ignore_query: true)
expect(page).not_to have_content organization.name
click_on 'Rejected'
@@ -136,7 +136,7 @@ feature 'Admin::Organizations' do
click_on 'Verify'
end
expect(page).to have_current_path(admin_organizations_path, only_path: true)
expect(page).to have_current_path(admin_organizations_path, ignore_query: true)
expect(page).not_to have_content organization.name
click_on('Verified')

View File

@@ -58,7 +58,7 @@ feature 'Admin poll questions' do
visit proposals_path
click_link "Create question"
expect(page).to have_current_path(new_admin_question_path, only_path: true)
expect(page).to have_current_path(new_admin_question_path, ignore_query: true)
expect(page).to have_field('poll_question_title', with: proposal.title)
select 'Proposals', from: 'poll_question_poll_id'