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
This commit is contained in:
parent
32ee6b3275
commit
c709c5120c
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue