Closed
Description
I use a lot the have_enqueued_job
matcher because I like its syntax and it also perform params serialization that allows me to catch invalid arguments given to background jobs such as symbol serialization.
However I think that it's a little bit too verbose when used with ActionMailer::DeliveryJob
e.g.
expect {
subject.perform request
}.to have_enqueued_job(ActionMailer::DeliveryJob).with(
'SubscriptionMailer',
'welcome',
'deliver_now',
hash_including('email_address' => email),
'en'
)
It would be very nice to have a specialized wrapper around it, something like this
expect {
subject.perform request
}.to have_enqueued_email(SubscriptionMailer, :welcome).with(hash_including('email_address' => email), 'en')
What do you think?
Metadata
Metadata
Assignees
Labels
No labels