mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-26 12:37:54 +08:00
When a site falls back to sendmail, the config appears to be broken
since Mail gem 2.9.0.
We're passing a string when it expects an array of strings.
See
d1d65b370b/lib/mail/network/delivery_methods/sendmail.rb (L53)
This was causing a pile up of digest email job retries, see dev topic
/t/182887
This PR fixes the config and also moves it to a GlobalSetting so I could
write a spec to make sure the default config is valid.
11 lines
434 B
Ruby
Vendored
11 lines
434 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
RSpec.describe "Sendmail Settings Integration" do
|
|
it "configures arguments as an Array, not a String (mail gem >= 2.9.0 compatibility)" do
|
|
expect(GlobalSetting.sendmail_settings[:arguments]).to be_an(Array)
|
|
end
|
|
|
|
it "does not raise an error when initialising Sendmail with the default settings" do
|
|
expect { Mail::Sendmail.new(GlobalSetting.sendmail_settings) }.not_to raise_error
|
|
end
|
|
end
|