diff options
author | José Valim and Mikel Lindsaar <pair@programming.com> | 2010-01-25 00:37:12 +0100 |
---|---|---|
committer | José Valim and Mikel Lindsaar <pair@programming.com> | 2010-01-25 00:37:12 +0100 |
commit | e1c131863897390d04bd5515765236590747f2c1 (patch) | |
tree | a1bbe3b869ed48c16b7c259812e3d459e2188734 /actionmailer/test | |
parent | 48faf53be19c569e85f43a4dbfa63fe81618b09f (diff) | |
download | rails-e1c131863897390d04bd5515765236590747f2c1.tar.gz rails-e1c131863897390d04bd5515765236590747f2c1.tar.bz2 rails-e1c131863897390d04bd5515765236590747f2c1.zip |
Added delivers_from.
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/base_test.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index b8d21132de..d8616ee3be 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -1,16 +1,14 @@ # encoding: utf-8 require 'abstract_unit' -# class Notifier < ActionMailer::Base -# delivers_from 'notifications@example.com' class BaseTest < ActiveSupport::TestCase DEFAULT_HEADERS = { :to => 'mikel@test.lindsaar.net', - :from => 'jose@test.plataformatec.com', :subject => 'The first email on new API!' } class BaseMailer < ActionMailer::Base + delivers_from 'jose@test.plataformatec.com' self.mailer_name = "base_mailer" def welcome(hash = {}) @@ -72,6 +70,11 @@ class BaseTest < ActiveSupport::TestCase assert_equal(email.subject, 'The first email on new API!') end + test "mail() with from overwrites the class level default" do + email = BaseMailer.welcome(:from => 'someone@else.com').deliver + assert_equal(email.from, ['someone@else.com']) + end + test "mail() with bcc, cc, content_type, charset, mime_version, reply_to and date" do @time = Time.now email = BaseMailer.welcome(:bcc => 'bcc@test.lindsaar.net', |