##// END OF EJS Templates
add test to send one mail with both settngs in creating issue (#15612)...
Toshi MARUYAMA -
r12108:436d44962d1f
parent child
Show More
@@ -1701,6 +1701,18 class IssueTest < ActiveSupport::TestCase
1701 1701 end
1702 1702 end
1703 1703
1704 def test_create_should_send_one_email_notification_with_both_settings
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 => %w(issue_added issue_updated) do
1711 assert issue.save
1712 assert_equal 1, ActionMailer::Base.deliveries.size
1713 end
1714 end
1715
1704 1716 def test_create_should_not_send_email_notification_with_no_setting
1705 1717 ActionMailer::Base.deliveries.clear
1706 1718 issue = Issue.new(:project_id => 1, :tracker_id => 1,
General Comments 0
You need to be logged in to leave comments. Login now