get :test_email
assert_redirected_to '/settings/edit?tab=notifications'
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
user = User.find(1)
assert_equal [user.mail], mail.bcc
end
assert_equal Project.find(1), a.container
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert_equal "[eCookbook] New file", mail.subject
assert mail.body.include?('testfile.txt')
end
assert issue.watched_by?(User.find(3))
# Watchers notified
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert [mail.bcc, mail.cc].flatten.include?(User.find(3).mail)
end
assert_equal '125', issue.custom_value_for(2).value
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert mail.subject.starts_with?("[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}]")
assert mail.body.include?("Subject changed from #{old_subject} to #{new_subject}")
end
assert_equal 'New custom value', issue.custom_value_for(2).value
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert mail.body.include?("Searchable field changed from 125 to New custom value")
end
assert_equal 1, message.board_id
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert_equal "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] Test created message", mail.subject
assert mail.body.include?('Message body')
# author
assert Mailer.deliver_issue_edit(journal)
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert_select_email do
# link to the main ticket
assert Mailer.deliver_issue_edit(journal)
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert_select_email do
# link to the main ticket
assert Mailer.deliver_issue_edit(journal)
mail = ActionMailer::Base.deliveries.last
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert_select_email do
# link to the main ticket
# 2 email notifications
assert_equal 2, ActionMailer::Base.deliveries.size
mail = ActionMailer::Base.deliveries.first
- assert_kind_of TMail::Mail, mail
+ assert_not_nil mail
assert mail.subject.starts_with?(
"[#{fixed_issue.project.name} - #{fixed_issue.tracker.name} ##{fixed_issue.id}]")
assert mail.body.include?(