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:
Javi Martín
2022-06-02 18:44:46 +02:00
parent 2d693328dc
commit 9a8536b1fc

View File

@@ -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