aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-19 09:34:01 -0400
committerJosé Valim <jose.valim@gmail.com>2011-05-19 12:35:07 -0400
commite4ebded5bcd4f54fee0c4f643c9df76aeb22436e (patch)
tree3f89d2ed0c57b8fc651d6c44c9eb0af16ff89678 /railties/test/application
parent2c08a7485581ee423f6d558ddb613b46c7da8c09 (diff)
downloadrails-e4ebded5bcd4f54fee0c4f643c9df76aeb22436e.tar.gz
rails-e4ebded5bcd4f54fee0c4f643c9df76aeb22436e.tar.bz2
rails-e4ebded5bcd4f54fee0c4f643c9df76aeb22436e.zip
Use Rack::ContentLength.
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/middleware_test.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb
index 8bfde00af5..6f14200a14 100644
--- a/railties/test/application/middleware_test.rb
+++ b/railties/test/application/middleware_test.rb
@@ -19,6 +19,7 @@ module ApplicationTests
boot!
assert_equal [
+ "Rack::ContentLength",
"ActionDispatch::Static",
"Rack::Lock",
"ActiveSupport::Cache::Strategy::LocalCache",
@@ -48,7 +49,7 @@ module ApplicationTests
boot!
- assert_equal "Rack::Cache", middleware.first
+ assert_equal "Rack::Cache", middleware.second
end
test "Rack::SSL is present when force_ssl is set" do
@@ -103,7 +104,7 @@ module ApplicationTests
end
test "insert middleware after" do
- add_to_config "config.middleware.insert_after ActionDispatch::Static, Rack::Config"
+ add_to_config "config.middleware.insert_after Rack::ContentLength, Rack::Config"
boot!
assert_equal "Rack::Config", middleware.second
end
@@ -111,12 +112,12 @@ module ApplicationTests
test "RAILS_CACHE does not respond to middleware" do
add_to_config "config.cache_store = :memory_store"
boot!
- assert_equal "Rack::Runtime", middleware.third
+ assert_equal "Rack::Runtime", middleware.fourth
end
test "RAILS_CACHE does respond to middleware" do
boot!
- assert_equal "Rack::Runtime", middleware.fourth
+ assert_equal "Rack::Runtime", middleware.fifth
end
test "identity map is inserted" do
@@ -126,7 +127,7 @@ module ApplicationTests
end
test "insert middleware before" do
- add_to_config "config.middleware.insert_before ActionDispatch::Static, Rack::Config"
+ add_to_config "config.middleware.insert_before Rack::ContentLength, Rack::Config"
boot!
assert_equal "Rack::Config", middleware.first
end