diff options
author | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-12-12 15:49:35 -0500 |
---|---|---|
committer | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2019-01-07 17:38:28 -0500 |
commit | 5d6578d15bb5d3bfe3751a6493b9e3fe99618408 (patch) | |
tree | 59ee4e82758dee925637499a4ec151e2971ba13e /actionmailer/test | |
parent | e5f2d2906a395dcac0afd1abc268ca7f061765b8 (diff) | |
download | rails-5d6578d15bb5d3bfe3751a6493b9e3fe99618408.tar.gz rails-5d6578d15bb5d3bfe3751a6493b9e3fe99618408.tar.bz2 rails-5d6578d15bb5d3bfe3751a6493b9e3fe99618408.zip |
Fix legacy fallback for parameterized mailers
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/abstract_unit.rb | 2 | ||||
-rw-r--r-- | actionmailer/test/legacy_delivery_job_test.rb | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index f647896374..448807c144 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -33,6 +33,8 @@ I18n.enforce_available_locales = false FIXTURE_LOAD_PATH = File.expand_path("fixtures", __dir__) ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH +ActionMailer::Base.delivery_job = ActionMailer::MailDeliveryJob + class ActiveSupport::TestCase include ActiveSupport::Testing::MethodCallAssertions diff --git a/actionmailer/test/legacy_delivery_job_test.rb b/actionmailer/test/legacy_delivery_job_test.rb index 112c842beb..3a3872df47 100644 --- a/actionmailer/test/legacy_delivery_job_test.rb +++ b/actionmailer/test/legacy_delivery_job_test.rb @@ -11,9 +11,6 @@ class LegacyDeliveryJobTest < ActiveSupport::TestCase class LegacyDeliveryJob < ActionMailer::DeliveryJob end - class LegacyParmeterizedDeliveryJob < ActionMailer::Parameterized::DeliveryJob - end - setup do @previous_logger = ActiveJob::Base.logger ActiveJob::Base.logger = Logger.new(nil) @@ -42,9 +39,9 @@ class LegacyDeliveryJobTest < ActiveSupport::TestCase { inviter: "david@basecamp.com", invitee: "jason@basecamp.com" }, ] - with_delivery_job(LegacyParmeterizedDeliveryJob) do + with_delivery_job(LegacyDeliveryJob) do assert_deprecated do - assert_performed_with(job: LegacyParmeterizedDeliveryJob, args: args) do + assert_performed_with(job: ActionMailer::Parameterized::DeliveryJob, args: args) do mail.deliver_later end end |