Skip to content
Browse files

Added CheckPending middleware in default

As this middleware comes by default in a new
rails app

Added test to check omit for CheckPending when

Active Record is not included.
  • Loading branch information...
1 parent b5f8630 commit 3b03733d9e132d44c78b74a810011299c81a2823 @arunagw arunagw committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 railties/test/application/middleware_test.rb
View
4 railties/test/application/middleware_test.rb
@@ -19,6 +19,8 @@ def app
end
test "default middleware stack" do
+ add_to_config "config.active_record.migration_error = :page_load"
+
boot!
assert_equal [
@@ -35,6 +37,7 @@ def app
"ActionDispatch::RemoteIp",
"ActionDispatch::Reloader",
"ActionDispatch::Callbacks",
+ "ActiveRecord::Migration::CheckPending",
"ActiveRecord::ConnectionAdapters::ConnectionManagement",
"ActiveRecord::QueryCache",
"ActionDispatch::Cookies",
@@ -88,6 +91,7 @@ def app
boot!
assert !middleware.include?("ActiveRecord::ConnectionAdapters::ConnectionManagement")
assert !middleware.include?("ActiveRecord::QueryCache")
+ assert !middleware.include?("ActiveRecord::Migration::CheckPending")
end
test "removes lock if cache classes is set" do

0 comments on commit 3b03733

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