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 /actionmailer/CHANGELOG.md | |
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 'actionmailer/CHANGELOG.md')
-rw-r--r-- | actionmailer/CHANGELOG.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md index 35574a2c73..ec6f249974 100644 --- a/actionmailer/CHANGELOG.md +++ b/actionmailer/CHANGELOG.md @@ -1,3 +1,8 @@ +* Fix ActionMailer assertions not working when a Mail defines + a custom delivery job class + + *Edouard Chin* + * Mails with multipart `format` blocks with implicit render now also check for a template name in options hash instead of only using the action name. |