2019-04-29 20:27:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-07-27 22:27:38 -04:00
|
|
|
RSpec.describe Jobs::ProcessEmail do
|
2016-08-08 16:28:27 -04:00
|
|
|
|
|
|
|
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
|
2021-01-19 22:22:41 -05:00
|
|
|
Email::Processor.expects(:process!).with(mail, retry_on_rate_limit: false, source: nil)
|
2016-08-08 16:28:27 -04:00
|
|
|
Jobs::ProcessEmail.new.execute(mail: mail)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|