Closed
Description
What Ruby, Rails and RSpec versions are you using?
Ruby version: 2.5.1
Rails version: 6.0.0
RSpec version: branch 4-0-dev
Observed behaviour
Given an email enqueued with:
SomeMailer.with(object: foo, option: { amended: true }).some_method.deliver_later
I would expect the following to pass:
expect { some_action_which_enqueues_mail }.to have_enqueued_mail(SomeMailer, :some_method).with(object: foo, option: { amended: true })
It doesn't pass when setting the default delivery job to ActionMailer::MailDeliveryJob
but does when using the legacy ActionMailer::Parameterized::DeliveryJob
(ie. config.load_defaults 5.2
and Rails.application.config.action_mailer.delivery_job = 'ActionMailer::MailDeliveryJob'
commented out in config/initializers/new_framework_defaults_6_0.rb
The listed enqueued mails shows the mail has been enqueued, but I cannot seem to access it with my test criteria.
Metadata
Metadata
Assignees
Labels
No labels