mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 08:03:40 +08:00
c9dab6fd08
It's very easy to forget to add `require 'rails_helper'` at the top of every core/plugin spec file, and omissions can cause some very confusing/sporadic errors. By setting this flag in `.rspec`, we can remove the need for `require 'rails_helper'` entirely.
13 lines
347 B
Ruby
13 lines
347 B
Ruby
# frozen_string_literal: true
|
|
|
|
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
|