mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:00:32 -06:00
fb184fed06
This should make it easier to track down how the incoming email was created, which is one of four locations: The POP3 poller (which picks up reply via email replies) The admin email controller #handle_mail (which is where hosted mail is sent) The IMAP sync tool The group SMTP mailer, which sends emails when replying to IMAP topics, pre-emptively creating IncomingEmail records to avoid double syncing
15 lines
371 B
Ruby
15 lines
371 B
Ruby
# frozen_string_literal: true
|
|
|
|
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, retry_on_rate_limit: false, source: nil)
|
|
Jobs::ProcessEmail.new.execute(mail: mail)
|
|
end
|
|
|
|
end
|