diff options
author | Arun Agrawal <arunagw@gmail.com> | 2013-07-15 10:47:59 +0200 |
---|---|---|
committer | Arun Agrawal <arunagw@gmail.com> | 2013-07-15 11:22:15 +0200 |
commit | 3b03733d9e132d44c78b74a810011299c81a2823 (patch) | |
tree | 5340cf8e131ec3e2c84889f7c4ce88df8e8484d1 | |
parent | b5f8630591475367c04e8151c938eb7670332b1a (diff) | |
download | rails-3b03733d9e132d44c78b74a810011299c81a2823.tar.gz rails-3b03733d9e132d44c78b74a810011299c81a2823.tar.bz2 rails-3b03733d9e132d44c78b74a810011299c81a2823.zip |
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.
-rw-r--r-- | railties/test/application/middleware_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 23c6b22fdc..31a35a09bb 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -19,6 +19,8 @@ module ApplicationTests end test "default middleware stack" do + add_to_config "config.active_record.migration_error = :page_load" + boot! assert_equal [ @@ -35,6 +37,7 @@ module ApplicationTests "ActionDispatch::RemoteIp", "ActionDispatch::Reloader", "ActionDispatch::Callbacks", + "ActiveRecord::Migration::CheckPending", "ActiveRecord::ConnectionAdapters::ConnectionManagement", "ActiveRecord::QueryCache", "ActionDispatch::Cookies", @@ -88,6 +91,7 @@ module ApplicationTests 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 |