Fix flaky admin notifications spec
It was failing when executed right before midnight due to the date changing between the moment the notification is created and the moment the test checks the notification shows the current date.
This commit is contained in:
@@ -34,7 +34,7 @@ feature "Admin Notifications" do
|
||||
end
|
||||
|
||||
context "Index" do
|
||||
scenario "Valid Admin Notifications" do
|
||||
scenario "Valid Admin Notifications", :with_frozen_time do
|
||||
draft = create(:admin_notification, segment_recipient: :all_users, title: 'Not yet sent')
|
||||
sent = create(:admin_notification, :sent, segment_recipient: :administrators,
|
||||
title: 'Sent one')
|
||||
|
||||
Reference in New Issue
Block a user