Add missing expectations after consecutive visits
This way we're 100% sure we won't have simultaneous requests since the test will wait for one request to finish before continuing. In the debates spec, we're also making sure the expectations between the two consecutive visits are different.
This commit is contained in:
@@ -664,10 +664,11 @@ describe "Debates" do
|
||||
user.erase
|
||||
|
||||
visit debates_path
|
||||
expect(page).to have_content("User deleted")
|
||||
expect(page).to have_content "User deleted"
|
||||
|
||||
visit debate_path(debate)
|
||||
expect(page).to have_content("User deleted")
|
||||
expect(page).to have_css "h1", exact_text: debate.title
|
||||
expect(page).to have_content "User deleted"
|
||||
end
|
||||
|
||||
context "Suggesting debates" do
|
||||
|
||||
@@ -39,7 +39,13 @@ describe "Sessions" do
|
||||
user = create(:user, :level_two)
|
||||
|
||||
visit debates_path
|
||||
|
||||
expect(page).to have_content "Help with debates"
|
||||
|
||||
visit "/"
|
||||
|
||||
expect(page).to have_content "Most active proposals"
|
||||
|
||||
click_link "Sign in"
|
||||
fill_in "user_login", with: user.email
|
||||
fill_in "user_password", with: user.password
|
||||
|
||||
Reference in New Issue
Block a user