mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Processing incoming email should be done in a background job.
This commit is contained in:
@@ -71,4 +71,16 @@ describe Admin::EmailController do
|
||||
end
|
||||
end
|
||||
|
||||
context '#handle_mail' do
|
||||
before do
|
||||
log_in_user(Fabricate(:admin))
|
||||
SiteSetting.queue_jobs = true
|
||||
end
|
||||
|
||||
it 'should enqueue the right job' do
|
||||
expect { xhr :post, :handle_mail, email: email('cc') }
|
||||
.to change { Jobs::ProcessEmail.jobs.count }.by(1)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -232,6 +232,4 @@ describe EmailController do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user