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
This commit is contained in:
parent
dceee1ea9a
commit
b212fdb72b
@ -1701,6 +1701,18 @@ class IssueTest < ActiveSupport::TestCase
|
|||||||
end
|
end
|
||||||
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
|
def test_stale_issue_should_not_send_email_notification
|
||||||
ActionMailer::Base.deliveries.clear
|
ActionMailer::Base.deliveries.clear
|
||||||
issue = Issue.find(1)
|
issue = Issue.find(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user