diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-04-18 00:29:18 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-04-18 00:29:18 +0000 |
commit | c709c5120c5c2362ecf72f86de895c0d46f337af (patch) | |
tree | efe889c9f01ed808a2e2f44eb6a51e9e42f41a43 /test/unit/mailer_test.rb | |
parent | 32ee6b32756e1cf21047c60da9d46e9b63bfa837 (diff) | |
download | redmine-c709c5120c5c2362ecf72f86de895c0d46f337af.tar.gz redmine-c709c5120c5c2362ecf72f86de895c0d46f337af.zip |
extend mail header test to text mail (#13482)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11719 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r-- | test/unit/mailer_test.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 223422002..31e8ef688 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -579,12 +579,20 @@ class MailerTest < ActiveSupport::TestCase def test_layout_should_include_the_emails_header with_settings :emails_header => "*Header content*" do - assert Mailer.test_email(User.find(1)).deliver - assert_select_email do - assert_select ".header" do - assert_select "strong", :text => "Header content" + with_settings :plain_text_mail => 0 do + assert Mailer.test_email(User.find(1)).deliver + assert_select_email do + assert_select ".header" do + assert_select "strong", :text => "Header content" + end end end + with_settings :plain_text_mail => 1 do + assert Mailer.test_email(User.find(1)).deliver + mail = last_email + assert_not_nil mail + assert_include "*Header content*", mail.body.decoded + end end end |