Add explanatory comments on usages of Timecop.travel

This commit is contained in:
Matt-Yorkley
2020-05-07 17:29:58 +02:00
parent 01d741509f
commit 86bfd1bebb

View File

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