@@ -1701,6 +1701,18 class IssueTest < ActiveSupport::TestCase | |||||
1701 | end |
|
1701 | end | |
1702 | end |
|
1702 | end | |
1703 |
|
1703 | |||
|
1704 | def test_create_should_not_send_email_notification_with_no_setting | |||
|
1705 | ActionMailer::Base.deliveries.clear | |||
|
1706 | issue = Issue.new(:project_id => 1, :tracker_id => 1, | |||
|
1707 | :author_id => 3, :status_id => 1, | |||
|
1708 | :priority => IssuePriority.all.first, | |||
|
1709 | :subject => 'test_create', :estimated_hours => '1:30') | |||
|
1710 | with_settings :notified_events => [] do | |||
|
1711 | assert issue.save | |||
|
1712 | assert_equal 0, ActionMailer::Base.deliveries.size | |||
|
1713 | end | |||
|
1714 | end | |||
|
1715 | ||||
1704 | def test_stale_issue_should_not_send_email_notification |
|
1716 | def test_stale_issue_should_not_send_email_notification | |
1705 | ActionMailer::Base.deliveries.clear |
|
1717 | ActionMailer::Base.deliveries.clear | |
1706 | issue = Issue.find(1) |
|
1718 | issue = Issue.find(1) |
General Comments 0
You need to be logged in to leave comments.
Login now