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