mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
Add new run_jobs_synchronously!
helper for tests
Previously if you wanted to have jobs execute in test mode, you'd have to do `SiteSetting.queue_jobs = false`, because the opposite of queue is to execute. I found this very confusing, so I created a test helper called `run_jobs_synchronously!` which is much more clear about what it does.
This commit is contained in:
parent
2ee02cb6c7
commit
d1d9a4f128
33 changed files with 51 additions and 45 deletions
|
@ -3,7 +3,7 @@ require 'rails_helper'
|
|||
describe Post do
|
||||
|
||||
before do
|
||||
SiteSetting.queue_jobs = false
|
||||
run_jobs_synchronously!
|
||||
end
|
||||
|
||||
describe '#local_dates' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue