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:
parent
9223ab4252
commit
dceee1ea9a
|
@ -1695,9 +1695,10 @@ class IssueTest < ActiveSupport::TestCase
|
|||
:author_id => 3, :status_id => 1,
|
||||
:priority => IssuePriority.all.first,
|
||||
:subject => 'test_create', :estimated_hours => '1:30')
|
||||
|
||||
assert issue.save
|
||||
assert_equal 1, ActionMailer::Base.deliveries.size
|
||||
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
|
||||
|
@ -1707,16 +1708,18 @@ class IssueTest < ActiveSupport::TestCase
|
|||
|
||||
issue.init_journal(User.find(1))
|
||||
issue.subject = 'Subjet update'
|
||||
assert issue.save
|
||||
assert_equal 1, ActionMailer::Base.deliveries.size
|
||||
ActionMailer::Base.deliveries.clear
|
||||
with_settings :notified_events => %w(issue_updated) do
|
||||
assert issue.save
|
||||
assert_equal 1, ActionMailer::Base.deliveries.size
|
||||
ActionMailer::Base.deliveries.clear
|
||||
|
||||
stale.init_journal(User.find(1))
|
||||
stale.subject = 'Another subjet update'
|
||||
assert_raise ActiveRecord::StaleObjectError do
|
||||
stale.save
|
||||
stale.init_journal(User.find(1))
|
||||
stale.subject = 'Another subjet update'
|
||||
assert_raise ActiveRecord::StaleObjectError do
|
||||
stale.save
|
||||
end
|
||||
assert ActionMailer::Base.deliveries.empty?
|
||||
end
|
||||
assert ActionMailer::Base.deliveries.empty?
|
||||
end
|
||||
|
||||
def test_journalized_description
|
||||
|
|
Loading…
Reference in New Issue