mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 09:10:25 +08:00
FEATURE: retry processing incoming emails on rate limit
This commit is contained in:
parent
5c06076b5c
commit
51322a46b3
5 changed files with 61 additions and 15 deletions
12
spec/jobs/process_email_spec.rb
Normal file
12
spec/jobs/process_email_spec.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
require "rails_helper"
|
||||
|
||||
describe Jobs::ProcessEmail do
|
||||
|
||||
let(:mail) { "From: foo@bar.com\nTo: bar@foo.com\nSubject: FOO BAR\n\nFoo foo bar bar?" }
|
||||
|
||||
it "process an email without retry" do
|
||||
Email::Processor.expects(:process!).with(mail, false)
|
||||
Jobs::ProcessEmail.new.execute(mail: mail)
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue