From b5c1f4f237b5574dca192bc0ab78806f0eaaa16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 23 Oct 2015 13:19:03 +0200 Subject: [PATCH] removes uri parsing in favor of current_path --- spec/features/management/proposals_spec.rb | 4 ++-- spec/features/votes_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/features/management/proposals_spec.rb b/spec/features/management/proposals_spec.rb index 2a296cf5f..8d256f67d 100644 --- a/spec/features/management/proposals_spec.rb +++ b/spec/features/management/proposals_spec.rb @@ -36,7 +36,7 @@ feature 'Proposals' do expect(page).to have_content user.name 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 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 "You already supported this proposal" end - expect(URI.parse(current_url).path).to eq(management_proposals_path) + expect(current_path).to eq(management_proposals_path) end scenario 'Voting proposals on behalf of someone in show view', :js do diff --git a/spec/features/votes_spec.rb b/spec/features/votes_spec.rb index 06f7ad4c9..31498191a 100644 --- a/spec/features/votes_spec.rb +++ b/spec/features/votes_spec.rb @@ -260,7 +260,7 @@ feature 'Votes' do expect(page).to have_content "1 support" expect(page).to have_content "You already supported this proposal, share it!" end - expect(URI.parse(current_url).path).to eq(proposals_path) + expect(current_path).to eq(proposals_path) end 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!" end - expect(URI.parse(current_url).path).to eq(proposals_path) + expect(current_path).to eq(proposals_path) end end end