Avoid simultaneous requests in moderation test
We were clicking on the "Sign in" link right after clicking on the "Sign out" link, which might result in simultaneous requests and exceptions when running our test suite. So we're adding an expectation to make sure the first request has finished before starting the following one.
This commit is contained in:
@@ -38,7 +38,9 @@ describe "Moderate users" do
|
|||||||
|
|
||||||
expect(page).not_to have_content(comment3.body)
|
expect(page).not_to have_content(comment3.body)
|
||||||
|
|
||||||
click_link("Sign out")
|
click_link "Sign out"
|
||||||
|
|
||||||
|
expect(page).to have_content "You have been signed out successfully"
|
||||||
|
|
||||||
visit root_path
|
visit root_path
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user