Add assertion about email notification on issue creation via email (#4228).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3115 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-12-02 19:52:56 +00:00
parent e5dc94fe82
commit c051947161
1 changed files with 5 additions and 0 deletions

View File

@ -42,6 +42,7 @@ class MailHandlerTest < ActiveSupport::TestCase
end
def test_add_issue
ActionMailer::Base.deliveries.clear
# This email contains: 'Project: onlinestore'
issue = submit_email('ticket_on_given_project.eml')
assert issue.is_a?(Issue)
@ -55,6 +56,10 @@ class MailHandlerTest < ActiveSupport::TestCase
# keywords should be removed from the email body
assert !issue.description.match(/^Project:/i)
assert !issue.description.match(/^Status:/i)
# Email notification should be sent
mail = ActionMailer::Base.deliveries.last
assert_not_nil mail
assert mail.subject.include?('New ticket on a given project')
end
def test_add_issue_with_status