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`.
This commit is contained in:
@@ -36,8 +36,6 @@ module Danbooru
|
|||||||
raise "Danbooru.config.secret_key_base not configured" if Danbooru.config.secret_key_base.blank?
|
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.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
|
if Danbooru.config.mail_delivery_method.to_sym == :smtp
|
||||||
config.action_mailer.delivery_method = :smtp
|
config.action_mailer.delivery_method = :smtp
|
||||||
config.action_mailer.smtp_settings = Danbooru.config.mail_settings
|
config.action_mailer.smtp_settings = Danbooru.config.mail_settings
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ Rails.application.configure do
|
|||||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
# 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.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
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||||
# the I18n.default_locale when a translation cannot be found).
|
# the I18n.default_locale when a translation cannot be found).
|
||||||
config.i18n.fallbacks = [I18n.default_locale]
|
config.i18n.fallbacks = [I18n.default_locale]
|
||||||
|
|||||||
Reference in New Issue
Block a user