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:
Javi Martín
2018-09-02 23:30:10 +02:00
parent d7b9ed1bc4
commit c1bb1fb2e1

View File

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