From 104b647ca4874329717657b228a87450e5ab5a69 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Fri, 27 Mar 2020 20:39:25 +0100 Subject: [PATCH] DEV: Fix another time-sensitive flaky spec --- spec/models/topic_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rb index d2661162f75..525541e4147 100644 --- a/spec/models/topic_spec.rb +++ b/spec/models/topic_spec.rb @@ -1748,6 +1748,7 @@ describe Topic do let(:topic) { Fabricate(:topic, category: category) } it "should be able to override category's default auto close" do + freeze_time Jobs.run_immediately! expect(topic.topic_timers.first.execute_at).to eq_time(topic.created_at + 4.hours)