File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
railties/test/application Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -4482,6 +4482,20 @@ def new(app); self; end
4482
4482
assert_equal true , ActiveRecord . run_after_transaction_callbacks_in_order_defined
4483
4483
end
4484
4484
4485
+ test "run_after_transaction_callbacks_in_order_defined can be set via framework defaults even if Active Record was previously loaded" do
4486
+ remove_from_config '.*config\.load_defaults.*\n'
4487
+ add_to_config 'config.load_defaults "7.0"'
4488
+ app_file "config/initializers/01_configure_database.rb" , <<-RUBY
4489
+ ActiveRecord::Base.connected?
4490
+ RUBY
4491
+ app_file "config/initializers/new_framework_defaults_7_1.rb" , <<-RUBY
4492
+ Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true
4493
+ RUBY
4494
+ app "development"
4495
+
4496
+ assert_equal true , ActiveRecord . run_after_transaction_callbacks_in_order_defined
4497
+ end
4498
+
4485
4499
test "raises if configuration tries to assign to an actual method" do
4486
4500
remove_from_config '.*config\.load_defaults.*\n'
4487
4501
add_to_config 'config.load_defaults = "7.0"'
You can’t perform that action at this time.
0 commit comments