From 15ba2f6cd7c10181b1c75f700f3186553353a5e3 Mon Sep 17 00:00:00 2001 From: evazion Date: Thu, 19 Mar 2020 19:06:29 -0500 Subject: [PATCH] tests: fix email delivery tests. Setting deliver_later_queue_name inside config/application.rb broke tests because assert_enqueued_email_with assumes that the deliver_later queue is called `mailers`. --- config/application.rb | 2 -- config/environments/production.rb | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/application.rb b/config/application.rb index dc9398d4e..075a741f2 100644 --- a/config/application.rb +++ b/config/application.rb @@ -36,8 +36,6 @@ module Danbooru raise "Danbooru.config.secret_key_base not configured" if Danbooru.config.secret_key_base.blank? config.secret_key_base = Danbooru.config.secret_key_base - config.action_mailer.deliver_later_queue_name = "default" - if Danbooru.config.mail_delivery_method.to_sym == :smtp config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = Danbooru.config.mail_settings diff --git a/config/environments/production.rb b/config/environments/production.rb index 6cccc8b4a..4550af040 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -66,6 +66,8 @@ Rails.application.configure do # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false + config.action_mailer.deliver_later_queue_name = :default + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = [I18n.default_locale]