diff options
author | Edouard CHIN <edouard.chin@shopify.com> | 2018-11-21 23:10:18 +0100 |
---|---|---|
committer | Edouard CHIN <edouard.chin@shopify.com> | 2018-11-21 23:17:04 +0100 |
commit | e139a3ce1376e1b74e0996f6f0ae17e584d5acad (patch) | |
tree | e75c844b0bfd6707207470c4d18a8d2e63d5d246 /activerecord | |
parent | cdb16ac576198607916cde6d55fe14cb775a98c9 (diff) | |
download | rails-e139a3ce1376e1b74e0996f6f0ae17e584d5acad.tar.gz rails-e139a3ce1376e1b74e0996f6f0ae17e584d5acad.tar.bz2 rails-e139a3ce1376e1b74e0996f6f0ae17e584d5acad.zip |
Fix ActionMailer assertion not working for mail defining delivery_job:
- If a Mail defines a custom delivery_job, all ActionMailer assertion
helper (assert_emails, assert_enqueued_emails ...) wouldn't work.
```ruby
MyMailer < ApplicationMailer
self.delivery_job = MyJob
end
# This assertion will fail
assert_emails(1) do
MyMailer.my_mail.deliver_later
end
This PR leverage the new ActiveJob feature that accepts Procs for the
`only` keyword and check if the delivery job is one of ActionMailer
registered ones.
Diffstat (limited to 'activerecord')
0 files changed, 0 insertions, 0 deletions