mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Take 2 Queue jobs in tests by default.
On my machine this cuts the time taken to run our test suite from ~11mins to ~9mins.
This commit is contained in:
@@ -36,12 +36,14 @@ RSpec.describe Admin::FlagsController do
|
||||
context '#agree' do
|
||||
it 'should work' do
|
||||
SiteSetting.allow_user_locale = true
|
||||
SiteSetting.queue_jobs = false
|
||||
|
||||
post_action = PostAction.act(user, post_1, PostActionType.types[:spam], message: 'bad')
|
||||
admin.update!(locale: 'ja')
|
||||
|
||||
post "/admin/flags/agree/#{post_1.id}.json"
|
||||
|
||||
expect(response).to be_success
|
||||
expect(response.status).to eq(200)
|
||||
|
||||
post_action.reload
|
||||
|
||||
|
||||
@@ -78,6 +78,8 @@ RSpec.describe Admin::GroupsController do
|
||||
let(:user2) { Fabricate(:user, trust_level: 4) }
|
||||
|
||||
it "can assign users to a group by email or username" do
|
||||
SiteSetting.queue_jobs = false
|
||||
|
||||
put "/admin/groups/bulk.json", params: {
|
||||
group_id: group.id, users: [user.username.upcase, user2.email, 'doesnt_exist']
|
||||
}
|
||||
|
||||
@@ -15,8 +15,6 @@ RSpec.describe Admin::UsersController do
|
||||
end
|
||||
|
||||
it 'should able to disable the second factor for another user' do
|
||||
SiteSetting.queue_jobs = true
|
||||
|
||||
expect do
|
||||
put "/admin/users/#{user.id}/disable_second_factor.json"
|
||||
end.to change { Jobs::CriticalUserEmail.jobs.length }.by(1)
|
||||
|
||||
Reference in New Issue
Block a user