explicitly use mail send setting in unit issue test (#15612)

git-svn-id: http://svn.redmine.org/redmine/trunk@12361 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2013-12-06 23:22:15 +00:00
parent 9223ab4252
commit dceee1ea9a
1 changed files with 14 additions and 11 deletions

View File

@ -1695,10 +1695,11 @@ class IssueTest < ActiveSupport::TestCase
:author_id => 3, :status_id => 1,
:priority => IssuePriority.all.first,
:subject => 'test_create', :estimated_hours => '1:30')
with_settings :notified_events => %w(issue_added) do
assert issue.save
assert_equal 1, ActionMailer::Base.deliveries.size
end
end
def test_stale_issue_should_not_send_email_notification
ActionMailer::Base.deliveries.clear
@ -1707,6 +1708,7 @@ class IssueTest < ActiveSupport::TestCase
issue.init_journal(User.find(1))
issue.subject = 'Subjet update'
with_settings :notified_events => %w(issue_updated) do
assert issue.save
assert_equal 1, ActionMailer::Base.deliveries.size
ActionMailer::Base.deliveries.clear
@ -1718,6 +1720,7 @@ class IssueTest < ActiveSupport::TestCase
end
assert ActionMailer::Base.deliveries.empty?
end
end
def test_journalized_description
IssueCustomField.delete_all