discourse/lib/generators/plugin/templates/controller_spec.rb.erb
Robin Ward fa5a158683 REFACTOR: Move queue_jobs out of SiteSetting
It is not a setting, and only relevant in specs. The new API is:

```
Jobs.run_later!        # jobs will be thrown on the queue
Jobs.run_immediately!  # jobs will run right away, avoid the queue
```
2019-03-14 10:47:38 -04:00

14 lines
254 B
Plaintext

require 'rails_helper'
describe <%= name %>::ActionsController do
before do
Jobs.run_immediately!
end
it 'can list' do
sign_in(Fabricate(:user))
get "/<%= dasherized_name %>/list.json"
expect(response.status).to eq(200)
end
end