diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-02 19:52:56 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-02 19:52:56 +0000 |
commit | c05194716187bbed4a778927f037c2cb41ef9668 (patch) | |
tree | f05ed2909c8160666fba799b9da43297c011fc4d /test/unit/mail_handler_test.rb | |
parent | e5dc94fe82cba5a8f099f8512e95144fa3a6aca1 (diff) | |
download | redmine-c05194716187bbed4a778927f037c2cb41ef9668.tar.gz redmine-c05194716187bbed4a778927f037c2cb41ef9668.zip |
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
Diffstat (limited to 'test/unit/mail_handler_test.rb')
-rw-r--r-- | test/unit/mail_handler_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 7e7dfa0c8..79cddd93c 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -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 |