diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-12-06 23:22:26 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-12-06 23:22:26 +0000 |
commit | b212fdb72b659cc8d0b236533223d3684688c138 (patch) | |
tree | 0d87f075a22add7383f67d1a3c7f72b6fd7a38e1 /test/unit/issue_test.rb | |
parent | dceee1ea9a1df45a36303b9ee213519e14afd8ed (diff) | |
download | redmine-b212fdb72b659cc8d0b236533223d3684688c138.tar.gz redmine-b212fdb72b659cc8d0b236533223d3684688c138.zip |
add test not to send mail with no settng in creating issue (#15612)
git-svn-id: http://svn.redmine.org/redmine/trunk@12362 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 90e529a4c..088890b15 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_not_send_email_notification_with_no_setting + 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 => [] do + assert issue.save + assert_equal 0, ActionMailer::Base.deliveries.size + end + end + def test_stale_issue_should_not_send_email_notification ActionMailer::Base.deliveries.clear issue = Issue.find(1) |