Remove timecop dependence

This commit is contained in:
David Taylor 2017-07-25 22:14:32 +01:00
parent c51e8ec3b5
commit 18aa827686
1 changed files with 11 additions and 10 deletions

View File

@ -16,7 +16,8 @@ RSpec.describe PostCreator do
end end
it 'should schedule a chat notification job' do it 'should schedule a chat notification job' do
Timecop.freeze do freeze_time
post = PostCreator.new(topic.user, post = PostCreator.new(topic.user,
raw: 'Some post content', raw: 'Some post content',
topic_id: topic.id topic_id: topic.id
@ -28,7 +29,7 @@ RSpec.describe PostCreator do
.to eq((Time.zone.now + SiteSetting.chat_integration_delay_seconds.seconds).to_f) .to eq((Time.zone.now + SiteSetting.chat_integration_delay_seconds.seconds).to_f)
expect(job['args'].first['post_id']).to eq(post.id) expect(job['args'].first['post_id']).to eq(post.id)
end
end end
end end