Apply Capybara/CurrentPathExpectation rubocop rule
This commit is contained in:
@@ -183,9 +183,6 @@ RSpec/BeEql:
|
|||||||
RSpec/BeforeAfterAll:
|
RSpec/BeforeAfterAll:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Capybara/CurrentPathExpectation:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Capybara/FeatureMethods:
|
Capybara/FeatureMethods:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ AllCops:
|
|||||||
# to ignore them, so only the ones explicitly set in this file are enabled.
|
# to ignore them, so only the ones explicitly set in this file are enabled.
|
||||||
DisabledByDefault: true
|
DisabledByDefault: true
|
||||||
|
|
||||||
|
Capybara/CurrentPathExpectation:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Capybara/FeatureMethods:
|
Capybara/FeatureMethods:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
EnabledMethods:
|
EnabledMethods:
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ describe "Admin activity" do
|
|||||||
|
|
||||||
within("#proposal_#{proposal.id}") do
|
within("#proposal_#{proposal.id}") do
|
||||||
click_link "Hide author"
|
click_link "Hide author"
|
||||||
expect(current_path).to eq(debates_path)
|
|
||||||
|
expect(page).to have_current_path(debates_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
visit admin_activity_path
|
visit admin_activity_path
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ describe "Admin users" do
|
|||||||
scenario "The username links to their public profile" do
|
scenario "The username links to their public profile" do
|
||||||
click_link @user.name
|
click_link @user.name
|
||||||
|
|
||||||
expect(current_path).to eq(user_path(@user))
|
expect(page).to have_current_path(user_path(@user))
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Search" do
|
scenario "Search" do
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ describe "Admin Budgets" do
|
|||||||
|
|
||||||
balloting_phase = budget.phases.where(kind: "balloting").first
|
balloting_phase = budget.phases.where(kind: "balloting").first
|
||||||
|
|
||||||
expect(current_path).to match(/admin\/polls\/\d+/)
|
expect(page).to have_current_path(/admin\/polls\/\d+/)
|
||||||
expect(page).to have_content(budget.name)
|
expect(page).to have_content(budget.name)
|
||||||
expect(page).to have_content(balloting_phase.starts_at.to_date)
|
expect(page).to have_content(balloting_phase.starts_at.to_date)
|
||||||
expect(page).to have_content(balloting_phase.ends_at.to_date)
|
expect(page).to have_content(balloting_phase.ends_at.to_date)
|
||||||
@@ -37,7 +37,7 @@ describe "Admin Budgets" do
|
|||||||
|
|
||||||
click_link "Bulletins de l’admin"
|
click_link "Bulletins de l’admin"
|
||||||
|
|
||||||
expect(current_path).to match(/admin\/polls\/\d+/)
|
expect(page).to have_current_path(/admin\/polls\/\d+/)
|
||||||
expect(page).to have_content("Budget pour le changement climatique")
|
expect(page).to have_content("Budget pour le changement climatique")
|
||||||
|
|
||||||
expect(Poll.count).to eq(1)
|
expect(Poll.count).to eq(1)
|
||||||
|
|||||||
@@ -1948,7 +1948,7 @@ describe "Successful proposals" do
|
|||||||
click_link "Create a proposal"
|
click_link "Create a proposal"
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(current_path).to eq(new_proposal_path)
|
expect(page).to have_current_path(new_proposal_path)
|
||||||
|
|
||||||
fill_in "Proposal title", with: "Help refugees"
|
fill_in "Proposal title", with: "Help refugees"
|
||||||
fill_in "Proposal summary", with: "In summary what we want is..."
|
fill_in "Proposal summary", with: "In summary what we want is..."
|
||||||
|
|||||||
Reference in New Issue
Block a user