aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorGannon McGibbon <gannon.mcgibbon@gmail.com>2018-12-12 14:32:15 -0500
committerGannon McGibbon <gannon.mcgibbon@gmail.com>2019-01-07 17:38:21 -0500
commite5f2d2906a395dcac0afd1abc268ca7f061765b8 (patch)
treebed6233fb6a98b1e660d7cffdbc8a84df59acd6e /railties/test/application
parent9cfcc067e626f0f1e220cc00a9f96622a936350d (diff)
downloadrails-e5f2d2906a395dcac0afd1abc268ca7f061765b8.tar.gz
rails-e5f2d2906a395dcac0afd1abc268ca7f061765b8.tar.bz2
rails-e5f2d2906a395dcac0afd1abc268ca7f061765b8.zip
Move MailDeliveryJob default to 6.0 defaults
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/configuration_test.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb
index 149f0e5af1..f2d64ce80b 100644
--- a/railties/test/application/configuration_test.rb
+++ b/railties/test/application/configuration_test.rb
@@ -2325,6 +2325,33 @@ module ApplicationTests
assert_equal :another_queue, ActionMailbox.queues[:routing]
end
+ test "ActionMailer::Base.delivery_job is ActionMailer::MailDeliveryJob by default" do
+ app "development"
+
+ assert_equal ActionMailer::MailDeliveryJob, ActionMailer::Base.delivery_job
+ end
+
+ test "ActionMailer::Base.delivery_job is ActionMailer::DeliveryJob in the 5.x defaults" do
+ remove_from_config '.*config\.load_defaults.*\n'
+ add_to_config 'config.load_defaults "5.2"'
+
+ app "development"
+
+ assert_equal ActionMailer::DeliveryJob, ActionMailer::Base.delivery_job
+ end
+
+ test "ActionMailer::Base.delivery_job can be configured in the new framework defaults" do
+ remove_from_config '.*config\.load_defaults.*\n'
+
+ app_file "config/initializers/new_framework_defaults_6_0.rb", <<-RUBY
+ Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
+ RUBY
+
+ app "development"
+
+ assert_equal ActionMailer::MailDeliveryJob, ActionMailer::Base.delivery_job
+ end
+
test "ActiveRecord::Base.filter_attributes should equal to filter_parameters" do
app_file "config/initializers/filter_parameters_logging.rb", <<-RUBY
Rails.application.config.filter_parameters += [ :password, :credit_card_number ]