diff --git a/spec/features/notifications_spec.rb b/spec/features/notifications_spec.rb index a53024109..7b044e18a 100644 --- a/spec/features/notifications_spec.rb +++ b/spec/features/notifications_spec.rb @@ -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