mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00

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.
14 lines
256 B
Plaintext
14 lines
256 B
Plaintext
require 'rails_helper'
|
|
|
|
describe <%= name %>::ActionsController do
|
|
before do
|
|
run_jobs_synchronously!
|
|
end
|
|
|
|
it 'can list' do
|
|
sign_in(Fabricate(:user))
|
|
get "/<%= dasherized_name %>/list.json"
|
|
expect(response.status).to eq(200)
|
|
end
|
|
end
|