From 9bc725865909cce7ac9fec484218328c6a681dc4 Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Sat, 25 Nov 2023 13:48:52 +0100 Subject: [PATCH] Return to original time --- spec/system/dashboard/activity_notifications_spec.rb | 2 ++ spec/system/dashboard/index_spec.rb | 3 +++ spec/system/profile/index_spec.rb | 2 ++ 3 files changed, 7 insertions(+) diff --git a/spec/system/dashboard/activity_notifications_spec.rb b/spec/system/dashboard/activity_notifications_spec.rb index 2d9a7cd00..4ae5ff88c 100644 --- a/spec/system/dashboard/activity_notifications_spec.rb +++ b/spec/system/dashboard/activity_notifications_spec.rb @@ -17,6 +17,8 @@ let(:contributor_without_avatar) { create(:contributor) } let(:another_contributor) { create(:contributor) } + after { Timecop.return } + it 'displays the activity notifications on dashboard' do visit dashboard_path(as: user) diff --git a/spec/system/dashboard/index_spec.rb b/spec/system/dashboard/index_spec.rb index 47a6558d6..d3d2016ce 100644 --- a/spec/system/dashboard/index_spec.rb +++ b/spec/system/dashboard/index_spec.rb @@ -13,6 +13,9 @@ request = create(:request, user: user) create_list(:message, 2, request: request, sender: contributor) end + + after { Timecop.return } + it 'Shows several useful sections' do Timecop.travel(Time.current.beginning_of_day + 5.hours) visit dashboard_path(as: user) diff --git a/spec/system/profile/index_spec.rb b/spec/system/profile/index_spec.rb index b822d684b..1f89ba1a9 100644 --- a/spec/system/profile/index_spec.rb +++ b/spec/system/profile/index_spec.rb @@ -30,6 +30,8 @@ current_plan.update(valid_from: Time.current, valid_until: Time.current + 6.months) end + after { Timecop.return } + it 'allows viewing/updating business plan' do visit dashboard_path(as: user)