diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-12-06 23:22:38 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-12-06 23:22:38 +0000 |
commit | 436d44962d1fa2217a8a122146cb6777802f9a85 (patch) | |
tree | 1063c924e3e0608aabb91f057e1cf6dcfd798af0 /test/unit/issue_test.rb | |
parent | b212fdb72b659cc8d0b236533223d3684688c138 (diff) | |
download | redmine-436d44962d1fa2217a8a122146cb6777802f9a85.tar.gz redmine-436d44962d1fa2217a8a122146cb6777802f9a85.zip |
add test to send one mail with both settngs in creating issue (#15612)
git-svn-id: http://svn.redmine.org/redmine/trunk@12363 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_test.rb')
-rw-r--r-- | test/unit/issue_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 088890b15..cf98cb1c3 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -1701,6 +1701,18 @@ class IssueTest < ActiveSupport::TestCase end end + def test_create_should_send_one_email_notification_with_both_settings + ActionMailer::Base.deliveries.clear + issue = Issue.new(:project_id => 1, :tracker_id => 1, + :author_id => 3, :status_id => 1, + :priority => IssuePriority.all.first, + :subject => 'test_create', :estimated_hours => '1:30') + with_settings :notified_events => %w(issue_added issue_updated) do + assert issue.save + assert_equal 1, ActionMailer::Base.deliveries.size + end + end + def test_create_should_not_send_email_notification_with_no_setting ActionMailer::Base.deliveries.clear issue = Issue.new(:project_id => 1, :tracker_id => 1, |