Fix notification expectations for read ones

This commit is contained in:
Bertocq
2018-03-28 09:19:58 +02:00
parent 0de3c070ee
commit c4049efa4a

View File

@@ -15,7 +15,7 @@ feature "Notifications" do
unread = create(:notification, user: user) unread = create(:notification, user: user)
click_notifications_icon click_notifications_icon
click_link "All notifications" click_link "Read"
expect(page).to have_css(".notification", count: 2) expect(page).to have_css(".notification", count: 2)
expect(page).to have_content(read1.notifiable_title) expect(page).to have_content(read1.notifiable_title)
@@ -85,7 +85,7 @@ feature "Notifications" do
notification2 = create(:notification, user: user) notification2 = create(:notification, user: user)
click_notifications_icon click_notifications_icon
click_link "All notifications" click_link "Read"
expect(page).to have_css(".notification", count: 1) expect(page).to have_css(".notification", count: 1)
within("#notification_#{notification1.id}") do within("#notification_#{notification1.id}") do