removes url parsing in favor of current_path
This commit is contained in:
@@ -71,7 +71,7 @@ feature 'Verify Letter' do
|
|||||||
visit new_letter_path
|
visit new_letter_path
|
||||||
|
|
||||||
expect(page).to have_content 'You have not yet confirmed your residence'
|
expect(page).to have_content 'You have not yet confirmed your residence'
|
||||||
expect(URI.parse(current_url).path).to eq(new_residence_path)
|
expect(current_path).to eq(new_residence_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Deny access unless verified phone/email" do
|
scenario "Deny access unless verified phone/email" do
|
||||||
@@ -81,7 +81,7 @@ feature 'Verify Letter' do
|
|||||||
visit new_letter_path
|
visit new_letter_path
|
||||||
|
|
||||||
expect(page).to have_content 'You have not yet enter the confirmation code'
|
expect(page).to have_content 'You have not yet enter the confirmation code'
|
||||||
expect(URI.parse(current_url).path).to eq(new_sms_path)
|
expect(current_path).to eq(new_sms_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario '6 tries allowed' do
|
scenario '6 tries allowed' do
|
||||||
@@ -97,11 +97,11 @@ feature 'Verify Letter' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
||||||
expect(URI.parse(current_url).path).to eq(account_path)
|
expect(current_path).to eq(account_path)
|
||||||
|
|
||||||
visit new_letter_path
|
visit new_letter_path
|
||||||
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
||||||
expect(URI.parse(current_url).path).to eq(account_path)
|
expect(current_path).to eq(account_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -74,10 +74,10 @@ feature 'Residence' do
|
|||||||
|
|
||||||
click_button 'Verify residence'
|
click_button 'Verify residence'
|
||||||
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
||||||
expect(URI.parse(current_url).path).to eq(account_path)
|
expect(current_path).to eq(account_path)
|
||||||
|
|
||||||
visit new_residence_path
|
visit new_residence_path
|
||||||
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
||||||
expect(URI.parse(current_url).path).to eq(account_path)
|
expect(current_path).to eq(account_path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -54,7 +54,7 @@ feature 'SMS Verification' do
|
|||||||
visit new_sms_path
|
visit new_sms_path
|
||||||
|
|
||||||
expect(page).to have_content 'You have not yet confirmed your residence'
|
expect(page).to have_content 'You have not yet confirmed your residence'
|
||||||
expect(URI.parse(current_url).path).to eq(new_residence_path)
|
expect(current_path).to eq(new_residence_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario '5 tries allowed' do
|
scenario '5 tries allowed' do
|
||||||
@@ -70,11 +70,11 @@ feature 'SMS Verification' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
||||||
expect(URI.parse(current_url).path).to eq(account_path)
|
expect(current_path).to eq(account_path)
|
||||||
|
|
||||||
visit new_sms_path
|
visit new_sms_path
|
||||||
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
||||||
expect(URI.parse(current_url).path).to eq(account_path)
|
expect(current_path).to eq(account_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -87,7 +87,7 @@ feature 'Verified users' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_content 'We have send you a confirmation email to your email account: rock@example.com'
|
expect(page).to have_content 'We have send you a confirmation email to your email account: rock@example.com'
|
||||||
expect(URI.parse(current_url).path).to eq(account_path)
|
expect(current_path).to eq(account_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Select a verified phone" do
|
scenario "Select a verified phone" do
|
||||||
@@ -123,7 +123,7 @@ feature 'Verified users' do
|
|||||||
|
|
||||||
click_link "Use another phone"
|
click_link "Use another phone"
|
||||||
|
|
||||||
expect(URI.parse(current_url).path).to eq(new_sms_path)
|
expect(current_path).to eq(new_sms_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "No verified information" do
|
scenario "No verified information" do
|
||||||
@@ -132,7 +132,7 @@ feature 'Verified users' do
|
|||||||
login_as(user)
|
login_as(user)
|
||||||
visit verified_user_path
|
visit verified_user_path
|
||||||
|
|
||||||
expect(URI.parse(current_url).path).to eq(new_sms_path)
|
expect(current_path).to eq(new_sms_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -220,7 +220,7 @@ feature 'Votes' do
|
|||||||
|
|
||||||
expect(page).to have_content "1 vote"
|
expect(page).to have_content "1 vote"
|
||||||
end
|
end
|
||||||
expect(URI.parse(current_url).path).to eq(root_path)
|
expect(current_path).to eq(root_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Create in index', :js do
|
scenario 'Create in index', :js do
|
||||||
@@ -242,7 +242,7 @@ feature 'Votes' do
|
|||||||
|
|
||||||
expect(page).to have_content "1 vote"
|
expect(page).to have_content "1 vote"
|
||||||
end
|
end
|
||||||
expect(URI.parse(current_url).path).to eq(debates_path)
|
expect(current_path).to eq(debates_path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user