discourse/spec/jobs/process_email_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
337 B
Ruby
Raw Normal View History

# 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, false)
Jobs::ProcessEmail.new.execute(mail: mail)
end
end