From c1bb1fb2e1b53ec43667e3fea3de7c15880bffe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 2 Sep 2018 23:30:10 +0200 Subject: [PATCH] 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. --- spec/features/admin/admin_notifications_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/admin/admin_notifications_spec.rb b/spec/features/admin/admin_notifications_spec.rb index 9bea144d4..9c4237ccb 100644 --- a/spec/features/admin/admin_notifications_spec.rb +++ b/spec/features/admin/admin_notifications_spec.rb @@ -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')