diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-09-10 11:07:41 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-09-10 11:07:41 -0700 |
commit | d68419a88e424e588c2d8decc69874bd00588766 (patch) | |
tree | cc3a3276b79681050424be1a2a0b3fc0a4df3de1 /actionmailer | |
parent | 05f88b7b0499781f87e9e79cbec4d01193db2352 (diff) | |
parent | 5374960a04d7333ced9b6c4ca36b708af498b1ca (diff) | |
download | rails-d68419a88e424e588c2d8decc69874bd00588766.tar.gz rails-d68419a88e424e588c2d8decc69874bd00588766.tar.bz2 rails-d68419a88e424e588c2d8decc69874bd00588766.zip |
Merge pull request #12193 from arunagw/revert-revert
Revert fixes
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/lib/action_mailer/delivery_methods.rb | 2 | ||||
-rw-r--r-- | actionmailer/test/delivery_methods_test.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb index 9a1a27c8ed..aedcd81e52 100644 --- a/actionmailer/lib/action_mailer/delivery_methods.rb +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -64,7 +64,7 @@ module ActionMailer raise "Delivery method cannot be nil" when Symbol if klass = delivery_methods[method] - mail.delivery_method(klass,(send(:"#{method}_settings") || {}).merge!(options || {})) + mail.delivery_method(klass, (send(:"#{method}_settings") || {}).merge(options || {})) else raise "Invalid delivery method #{method.inspect}" end diff --git a/actionmailer/test/delivery_methods_test.rb b/actionmailer/test/delivery_methods_test.rb index 61a037ea18..20412c7bb2 100644 --- a/actionmailer/test/delivery_methods_test.rb +++ b/actionmailer/test/delivery_methods_test.rb @@ -152,6 +152,9 @@ class MailDeliveryTest < ActiveSupport::TestCase assert_equal "overridden", delivery_method_instance.settings[:user_name] assert_equal "somethingobtuse", delivery_method_instance.settings[:password] assert_equal delivery_method_instance.settings.merge(overridden_options), delivery_method_instance.settings + + # make sure that overriding delivery method options per mail instance doesn't affect the Base setting + assert_equal settings, ActionMailer::Base.smtp_settings end test "non registered delivery methods raises errors" do |