diff options
Diffstat (limited to 'railties/test/application/initializers/frameworks_test.rb')
-rw-r--r-- | railties/test/application/initializers/frameworks_test.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index 4ff10091b1..d8e916f45f 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -98,7 +98,17 @@ module ApplicationTests require "#{app_path}/config/environment" - expects = [ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActiveRecord::SessionStore] + expects = [ActiveRecord::QueryCache, ActiveRecord::SessionStore] + middleware = Rails.application.config.middleware.map { |m| m.klass } + assert_equal expects, middleware & expects + end + + test "database middleware initializes when allow concurrency is true" do + add_to_config "config.threadsafe!" + + require "#{app_path}/config/environment" + + expects = [ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache] middleware = Rails.application.config.middleware.map { |m| m.klass } assert_equal expects, middleware & expects end |