Fix follower notifications flaky spec

This commit is contained in:
Bertocq
2017-07-11 18:08:58 +02:00
parent 9c4eb4cef3
commit dd54be111d

View File

@@ -248,7 +248,7 @@ feature "Notifications" do
create(:follow, :followed_proposal, user: user1, followable: proposal)
create(:follow, :followed_proposal, user: user2, followable: proposal)
login_as(author)
login_as author.reload
visit root_path
visit new_proposal_notification_path(proposal_id: proposal.id)
@@ -260,7 +260,7 @@ feature "Notifications" do
expect(page).to have_content "Your message has been sent correctly."
logout
login_as user1
login_as user1.reload
visit root_path
find(".icon-notification").click
@@ -271,7 +271,7 @@ feature "Notifications" do
expect(page).to have_xpath "//a[@href='#{notification_path(notification_for_user1)}']"
logout
login_as user2
login_as user2.reload
visit root_path
find(".icon-notification").click
@@ -282,7 +282,7 @@ feature "Notifications" do
expect(page).to have_xpath "//a[@href='#{notification_path(notification_for_user2)}']"
logout
login_as user3
login_as user3.reload
visit root_path
find(".icon-no-notification").click