Use deliver_later for all email sending

This commit is contained in:
Andy Allan 2018-10-31 16:38:12 +01:00
parent 801522c5c3
commit b54362d458
14 changed files with 452 additions and 334 deletions

View file

@ -2153,7 +2153,9 @@ CHANGESET
assert_difference "ChangesetComment.count", 1 do
assert_no_difference "ActionMailer::Base.deliveries.size" do
post :comment, :params => { :id => private_user_closed_changeset.id, :text => "This is a comment" }
perform_enqueued_jobs do
post :comment, :params => { :id => private_user_closed_changeset.id, :text => "This is a comment" }
end
end
end
assert_response :success
@ -2166,7 +2168,9 @@ CHANGESET
assert_difference "ChangesetComment.count", 1 do
assert_difference "ActionMailer::Base.deliveries.size", 1 do
post :comment, :params => { :id => changeset.id, :text => "This is a comment" }
perform_enqueued_jobs do
post :comment, :params => { :id => changeset.id, :text => "This is a comment" }
end
end
end
assert_response :success
@ -2182,7 +2186,9 @@ CHANGESET
assert_difference "ChangesetComment.count", 1 do
assert_difference "ActionMailer::Base.deliveries.size", 2 do
post :comment, :params => { :id => changeset.id, :text => "This is a comment" }
perform_enqueued_jobs do
post :comment, :params => { :id => changeset.id, :text => "This is a comment" }
end
end
end
assert_response :success