DEV: Queue jobs in tests by default.

This commit is contained in:
Guo Xiang Tan
2018-05-31 14:19:11 +08:00
parent 95f9b72351
commit be28154d3b
42 changed files with 75 additions and 79 deletions

View File

@@ -176,6 +176,10 @@ RSpec.describe TopicTimer, type: :model do
)
end
before do
SiteSetting.queue_jobs = false
end
it 'should close the topic' do
topic_timer
expect(topic.reload.closed).to eq(true)
@@ -201,6 +205,10 @@ RSpec.describe TopicTimer, type: :model do
)
end
before do
SiteSetting.queue_jobs = false
end
it 'should open the topic' do
topic_timer
expect(topic.reload.closed).to eq(false)
@@ -239,10 +247,6 @@ RSpec.describe TopicTimer, type: :model do
end
describe '.ensure_consistency!' do
before do
SiteSetting.queue_jobs = true
end
it 'should enqueue jobs that have been missed' do
close_topic_timer = Fabricate(:topic_timer,
execute_at: Time.zone.now - 1.hour,