From fc61b92183cd5fc32c6dce633112b557f631ee06 Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Mon, 24 Jun 2019 14:08:04 +0300 Subject: [PATCH] FIX: Fix heisentest caused by float operations. --- spec/jobs/regular/notify_chats_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/jobs/regular/notify_chats_spec.rb b/spec/jobs/regular/notify_chats_spec.rb index 8063937..dec9ee8 100644 --- a/spec/jobs/regular/notify_chats_spec.rb +++ b/spec/jobs/regular/notify_chats_spec.rb @@ -6,7 +6,6 @@ RSpec.describe PostCreator do let(:topic) { Fabricate(:post).topic } before do - SiteSetting.queue_jobs = true Jobs::NotifyChats.jobs.clear end @@ -17,7 +16,7 @@ RSpec.describe PostCreator do end it 'should schedule a chat notification job' do - freeze_time + freeze_time Time.now.beginning_of_day post = PostCreator.new(topic.user, raw: 'Some post content', @@ -27,7 +26,7 @@ RSpec.describe PostCreator do job = Jobs::NotifyChats.jobs.last expect(job['at']) - .to eq((Time.zone.now + SiteSetting.chat_integration_delay_seconds.seconds).to_f) + .to eq(Time.now.to_f + SiteSetting.chat_integration_delay_seconds.seconds.to_f) expect(job['args'].first['post_id']).to eq(post.id)