diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-08 07:24:41 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-08 07:24:41 -0800 |
commit | 40991dd4bcbd2d9de0d9ba1b775a103532d9fae7 (patch) | |
tree | a9ebf2deafa6a04bde975886d3fc98b630683ece /actionmailer/test | |
parent | bef330803ae4a30bfeaf6dd9c86077cfb5e250e1 (diff) | |
parent | 4ec7493e3cb9366df604f9f3082b4cd6f6dfd4fd (diff) | |
download | rails-40991dd4bcbd2d9de0d9ba1b775a103532d9fae7.tar.gz rails-40991dd4bcbd2d9de0d9ba1b775a103532d9fae7.tar.bz2 rails-40991dd4bcbd2d9de0d9ba1b775a103532d9fae7.zip |
Merge pull request #8465 from frodsan/update_am_action_callbacks
use _action callbacks in actionmailer
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/base_test.rb | 20 | ||||
-rw-r--r-- | actionmailer/test/fixtures/base_test/after_action_mailer/welcome.html.erb (renamed from actionmailer/test/fixtures/base_test/after_filter_mailer/welcome.html.erb) | 0 | ||||
-rw-r--r-- | actionmailer/test/fixtures/base_test/before_action_mailer/welcome.html.erb (renamed from actionmailer/test/fixtures/base_test/before_filter_mailer/welcome.html.erb) | 0 |
3 files changed, 10 insertions, 10 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 3c21886502..4a608a9ad4 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -584,9 +584,9 @@ class BaseTest < ActiveSupport::TestCase assert_equal("Thanks for signing up this afternoon", mail.subject) end - test "modifying the mail message with a before_filter" do - class BeforeFilterMailer < ActionMailer::Base - before_filter :add_special_header! + test "modifying the mail message with a before_action" do + class BeforeActionMailer < ActionMailer::Base + before_action :add_special_header! def welcome ; mail ; end @@ -596,12 +596,12 @@ class BaseTest < ActiveSupport::TestCase end end - assert_equal('Wow, so special', BeforeFilterMailer.welcome['X-Special-Header'].to_s) + assert_equal('Wow, so special', BeforeActionMailer.welcome['X-Special-Header'].to_s) end - test "modifying the mail message with an after_filter" do - class AfterFilterMailer < ActionMailer::Base - after_filter :add_special_header! + test "modifying the mail message with an after_action" do + class AfterActionMailer < ActionMailer::Base + after_action :add_special_header! def welcome ; mail ; end @@ -611,12 +611,12 @@ class BaseTest < ActiveSupport::TestCase end end - assert_equal('Testing', AfterFilterMailer.welcome['X-Special-Header'].to_s) + assert_equal('Testing', AfterActionMailer.welcome['X-Special-Header'].to_s) end - test "adding an inline attachment using a before_filter" do + test "adding an inline attachment using a before_action" do class DefaultInlineAttachmentMailer < ActionMailer::Base - before_filter :add_inline_attachment! + before_action :add_inline_attachment! def welcome ; mail ; end diff --git a/actionmailer/test/fixtures/base_test/after_filter_mailer/welcome.html.erb b/actionmailer/test/fixtures/base_test/after_action_mailer/welcome.html.erb index e69de29bb2..e69de29bb2 100644 --- a/actionmailer/test/fixtures/base_test/after_filter_mailer/welcome.html.erb +++ b/actionmailer/test/fixtures/base_test/after_action_mailer/welcome.html.erb diff --git a/actionmailer/test/fixtures/base_test/before_filter_mailer/welcome.html.erb b/actionmailer/test/fixtures/base_test/before_action_mailer/welcome.html.erb index e69de29bb2..e69de29bb2 100644 --- a/actionmailer/test/fixtures/base_test/before_filter_mailer/welcome.html.erb +++ b/actionmailer/test/fixtures/base_test/before_action_mailer/welcome.html.erb |