@@ -42,6 +42,7 class MailHandlerTest < ActiveSupport::TestCase | |||||
42 | end |
|
42 | end | |
43 |
|
43 | |||
44 | def test_add_issue |
|
44 | def test_add_issue | |
|
45 | ActionMailer::Base.deliveries.clear | |||
45 | # This email contains: 'Project: onlinestore' |
|
46 | # This email contains: 'Project: onlinestore' | |
46 | issue = submit_email('ticket_on_given_project.eml') |
|
47 | issue = submit_email('ticket_on_given_project.eml') | |
47 | assert issue.is_a?(Issue) |
|
48 | assert issue.is_a?(Issue) | |
@@ -55,6 +56,10 class MailHandlerTest < ActiveSupport::TestCase | |||||
55 | # keywords should be removed from the email body |
|
56 | # keywords should be removed from the email body | |
56 | assert !issue.description.match(/^Project:/i) |
|
57 | assert !issue.description.match(/^Project:/i) | |
57 | assert !issue.description.match(/^Status:/i) |
|
58 | assert !issue.description.match(/^Status:/i) | |
|
59 | # Email notification should be sent | |||
|
60 | mail = ActionMailer::Base.deliveries.last | |||
|
61 | assert_not_nil mail | |||
|
62 | assert mail.subject.include?('New ticket on a given project') | |||
58 | end |
|
63 | end | |
59 |
|
64 | |||
60 | def test_add_issue_with_status |
|
65 | def test_add_issue_with_status |
General Comments 0
You need to be logged in to leave comments.
Login now