A platform for community discussion. Free, open, simple.
DEV: Fix topic timer flaky spec for inheriting from category (#12106)
Martin Brennan3bfb1b34a1f4
diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rbindex 6a63d1578f9..fb451850e07 100644--- a/spec/models/topic_spec.rb+++ b/spec/models/topic_spec.rb@@ -1618,6 +1618,7 @@ describe Topic doit 'should set a topic timer' dofreeze_time+ now = Time.zone.nowexpect { topic.change_category_to_id(new_category.id) }.to change { TopicTimer.count }.by(1)@@ -1628,7 +1629,7 @@ describe Topic doexpect(topic_timer.user).to eq(Discourse.system_user)expect(topic_timer.topic).to eq(topic)- expect(topic_timer.execute_at).to be_within_one_second_of(5.hours.from_now)+ expect(topic_timer.execute_at).to be_within_one_second_of(now + 5.hours)enddescribe 'when topic is already closed' do