discourse/spec/jobs/process_email_spec.rb
Dan Ungureanu c72bc27888
FEATURE: Implement support for IMAP and SMTP email protocols. (#8301)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2020-07-10 12:05:55 +03:00

15 lines
358 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)
Jobs::ProcessEmail.new.execute(mail: mail)
end
end