Attempt to make spec more robust

This commit is contained in:
Sam 2018-06-14 16:10:30 +10:00
parent 2ddf8ea0f8
commit 1d9fdcd9d3

View File

@ -28,7 +28,7 @@ describe Jobs::ToggleTopicClosed do
it 'should be work' do it 'should be work' do
topic.update!(closed: true) topic.update!(closed: true)
freeze_time(1.hour.from_now) do freeze_time(61.minutes.from_now) do
described_class.new.execute( described_class.new.execute(
topic_timer_id: topic.public_topic_timer.id, topic_timer_id: topic.public_topic_timer.id,
state: false state: false
@ -37,7 +37,7 @@ describe Jobs::ToggleTopicClosed do
expect(topic.reload.closed).to eq(false) expect(topic.reload.closed).to eq(false)
expect(Post.last.raw).to eq(I18n.t( expect(Post.last.raw).to eq(I18n.t(
'topic_statuses.autoclosed_disabled_minutes', count: 60 'topic_statuses.autoclosed_disabled_minutes', count: 61
)) ))
end end
end end