mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #507 from dlee/fix_identity_map_tests
Fix tests to reflect IdentityMap no longer default
This commit is contained in:
commit
4a6855e183
2 changed files with 2 additions and 2 deletions
|
@ -166,7 +166,7 @@ module ApplicationTests
|
|||
|
||||
require "#{app_path}/config/environment"
|
||||
|
||||
expects = [ActiveRecord::IdentityMap::Middleware, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActiveRecord::SessionStore]
|
||||
expects = [ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActiveRecord::SessionStore]
|
||||
middleware = Rails.application.config.middleware.map { |m| m.klass }
|
||||
assert_equal expects, middleware & expects
|
||||
end
|
||||
|
|
|
@ -30,7 +30,6 @@ module ApplicationTests
|
|||
"Rack::Sendfile",
|
||||
"ActionDispatch::Reloader",
|
||||
"ActionDispatch::Callbacks",
|
||||
"ActiveRecord::IdentityMap::Middleware",
|
||||
"ActiveRecord::ConnectionAdapters::ConnectionManagement",
|
||||
"ActiveRecord::QueryCache",
|
||||
"ActionDispatch::Cookies",
|
||||
|
@ -121,6 +120,7 @@ module ApplicationTests
|
|||
end
|
||||
|
||||
test "identity map is inserted" do
|
||||
add_to_config "config.active_record.identity_map = true"
|
||||
boot!
|
||||
assert middleware.include?("ActiveRecord::IdentityMap::Middleware")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue