removes uri parsing in favor of current_path

This commit is contained in:
Juanjo Bazán
2015-10-23 13:19:03 +02:00
parent 5ee95a7b5b
commit b5c1f4f237
2 changed files with 4 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ feature 'Proposals' do
expect(page).to have_content user.name expect(page).to have_content user.name
expect(page).to have_content I18n.l(Proposal.last.created_at.to_date) expect(page).to have_content I18n.l(Proposal.last.created_at.to_date)
expect(URI.parse(current_url).path).to eq(management_proposal_path(Proposal.last)) expect(current_path).to eq(management_proposal_path(Proposal.last))
end end
scenario "Should not allow unverified users to create proposals" do scenario "Should not allow unverified users to create proposals" do
@@ -108,7 +108,7 @@ feature 'Proposals' do
expect(page).to have_content "1 support" expect(page).to have_content "1 support"
expect(page).to have_content "You already supported this proposal" expect(page).to have_content "You already supported this proposal"
end end
expect(URI.parse(current_url).path).to eq(management_proposals_path) expect(current_path).to eq(management_proposals_path)
end end
scenario 'Voting proposals on behalf of someone in show view', :js do scenario 'Voting proposals on behalf of someone in show view', :js do

View File

@@ -260,7 +260,7 @@ feature 'Votes' do
expect(page).to have_content "1 support" expect(page).to have_content "1 support"
expect(page).to have_content "You already supported this proposal, share it!" expect(page).to have_content "You already supported this proposal, share it!"
end end
expect(URI.parse(current_url).path).to eq(proposals_path) expect(current_path).to eq(proposals_path)
end end
scenario 'Create in featured proposal in index', :js do scenario 'Create in featured proposal in index', :js do
@@ -271,7 +271,7 @@ feature 'Votes' do
expect(page).to have_content "You already supported this proposal, share it!" expect(page).to have_content "You already supported this proposal, share it!"
end end
expect(URI.parse(current_url).path).to eq(proposals_path) expect(current_path).to eq(proposals_path)
end end
end end
end end