From 86bfd1bebbec70e5d2c0dce40942fa3b4f3974b0 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Thu, 7 May 2020 17:29:58 +0200 Subject: [PATCH] Add explanatory comments on usages of Timecop.travel --- spec/features/consumer/caching/shops_caching_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/features/consumer/caching/shops_caching_spec.rb b/spec/features/consumer/caching/shops_caching_spec.rb index 2c3d845a2d..654a2f4524 100644 --- a/spec/features/consumer/caching/shops_caching_spec.rb +++ b/spec/features/consumer/caching/shops_caching_spec.rb @@ -18,6 +18,7 @@ feature "Shops caching", js: true, caching: true do end it "keeps data cached for a short time on subsequent requests" do + # Ensure sufficient time for requests to load and timed caches to expire Timecop.travel(10.minutes.ago) do visit shops_path @@ -65,6 +66,7 @@ feature "Shops caching", js: true, caching: true do end it "keeps data cached for a short time on subsequent requests" do + # Ensure sufficient time for requests to load and timed caches to expire Timecop.travel(10.minutes.ago) do visit enterprise_shop_path(distributor)