From 1b7be1500ff2a6917010fe044c8b62d260a7c0aa Mon Sep 17 00:00:00 2001 From: Natalia Date: Mon, 6 May 2019 12:18:07 -0500 Subject: [PATCH] Time variable used to be created with users timezone, it has to be UTC in order to pass the test --- spec/models/search_log_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/search_log_spec.rb b/spec/models/search_log_spec.rb index 568b1653f93..598e273b6bb 100644 --- a/spec/models/search_log_spec.rb +++ b/spec/models/search_log_spec.rb @@ -165,7 +165,7 @@ RSpec.describe SearchLog, type: :model do describe ".term_details" do it "should only use the date for the period" do - time = Time.new(2019, 5, 23, 18, 15, 30) + time = Time.utc(2019, 5, 23, 18, 15, 30) freeze_time(time) search_log = Fabricate(:search_log, created_at: time - 1.hour)