summaryrefslogtreecommitdiffstats
path: root/test/unit/mailer_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r--test/unit/mailer_test.rb16
1 files changed, 13 insertions, 3 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
index b1c39bb5e..5024a845b 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class MailerTest < Test::Unit::TestCase
+class MailerTest < ActiveSupport::TestCase
include Redmine::I18n
fixtures :projects, :issues, :users, :members, :member_roles, :documents, :attachments, :news, :tokens, :journals, :journal_details, :changesets, :trackers, :issue_statuses, :enumerations, :messages, :boards, :repositories
@@ -103,9 +103,19 @@ class MailerTest < Test::Unit::TestCase
journal = Journal.find(2)
Mailer.deliver_issue_edit(journal)
mail = ActionMailer::Base.deliveries.last
- assert !mail.body.include?('<a href="https://mydomain.foo/issues/1">Bug #1: Can\'t print recipes</a>')
+ assert_equal 1, mail.parts.size
+ assert !mail.encoded.include?('href')
end
-
+
+ def test_html_mail
+ Setting.plain_text_mail = 0
+ journal = Journal.find(2)
+ Mailer.deliver_issue_edit(journal)
+ mail = ActionMailer::Base.deliveries.last
+ assert_equal 2, mail.parts.size
+ assert mail.encoded.include?('href')
+ end
+
def test_issue_add_message_id
ActionMailer::Base.deliveries.clear
issue = Issue.find(1)