mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +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:
@ -78,7 +78,7 @@ describe CategoriesController do
|
||||
|
||||
describe "logged in" do
|
||||
before do
|
||||
SiteSetting.queue_jobs = false
|
||||
run_jobs_synchronously!
|
||||
sign_in(admin)
|
||||
end
|
||||
|
||||
@ -226,7 +226,7 @@ describe CategoriesController do
|
||||
|
||||
context '#update' do
|
||||
before do
|
||||
SiteSetting.queue_jobs = false
|
||||
run_jobs_synchronously!
|
||||
end
|
||||
|
||||
it "requires the user to be logged in" do
|
||||
|
Reference in New Issue
Block a user