Skip to content
Browse files

Fix tests to reflect IdentityMap no longer default

Broke in 0e1dcae
  • Loading branch information...
1 parent fa187ec commit 828f171536527c6f6ba9d1b78037008d99a4a5e1 @dlee dlee committed
View
2 railties/test/application/initializers/frameworks_test.rb
@@ -166,7 +166,7 @@ def from_bar_helper
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
View
2 railties/test/application/middleware_test.rb
@@ -30,7 +30,6 @@ def app
"Rack::Sendfile",
"ActionDispatch::Reloader",
"ActionDispatch::Callbacks",
- "ActiveRecord::IdentityMap::Middleware",
"ActiveRecord::ConnectionAdapters::ConnectionManagement",
"ActiveRecord::QueryCache",
"ActionDispatch::Cookies",
@@ -121,6 +120,7 @@ def app
end
test "identity map is inserted" do
+ add_to_config "config.active_record.identity_map = true"
boot!
assert middleware.include?("ActiveRecord::IdentityMap::Middleware")
end

0 comments on commit 828f171

Please sign in to comment.
Something went wrong with that request. Please try again.