summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-17 09:21:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-17 09:21:49 +0000
commit5c441cffcab5bbbcc86853c06f22792b2e510375 (patch)
treeff6274862bdd17d57951a848582b5972a6fcaa8b /test
parentb837e3627b6f8c29363fc4fcf594bc4025bbee28 (diff)
downloadredmine-5c441cffcab5bbbcc86853c06f22792b2e510375.tar.gz
redmine-5c441cffcab5bbbcc86853c06f22792b2e510375.zip
Moved notification assertion to its own test.
git-svn-id: http://svn.redmine.org/redmine/trunk@14685 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/mail_handler_test.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index a93ecfedf..eb2417d58 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -63,11 +63,6 @@ class MailHandlerTest < ActiveSupport::TestCase
assert !issue.description.match(/^Project:/i)
assert !issue.description.match(/^Status:/i)
assert !issue.description.match(/^Start Date:/i)
- # Email notification should be sent
- mail = ActionMailer::Base.deliveries.last
- assert_not_nil mail
- assert mail.subject.include?("##{issue.id}")
- assert mail.subject.include?('New ticket on a given project')
end
def test_add_issue_with_all_overrides
@@ -355,6 +350,17 @@ class MailHandlerTest < ActiveSupport::TestCase
end
end
+ def test_add_issue_should_send_notification
+ issue = submit_email('ticket_on_given_project.eml', :allow_override => 'all')
+ assert issue.is_a?(Issue)
+ assert !issue.new_record?
+
+ mail = ActionMailer::Base.deliveries.last
+ assert_not_nil mail
+ assert mail.subject.include?("##{issue.id}")
+ assert mail.subject.include?('New ticket on a given project')
+ end
+
def test_created_user_should_be_added_to_groups
group1 = Group.generate!
group2 = Group.generate!