Skip to content
Browse files

adding middleware test for RAILS_CACHE

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 974196b commit 81c5684267b0341a1537c2db83a820bcff8dc808 @neerajdotname neerajdotname committed with josevalim
Showing with 11 additions and 0 deletions.
  1. +11 −0 railties/test/application/middleware_test.rb
View
11 railties/test/application/middleware_test.rb
@@ -83,6 +83,17 @@ def app
assert_equal "Rack::Config", middleware.second
end
+ test "RAILS_CACHE does not respond to middleware" do
+ add_to_config "config.cache_store = :memory_store"
+ boot!
+ assert_equal "Rack::Runtime", middleware.third
+ end
+
+ test "RAILS_CACHE does respond to middleware" do
+ boot!
+ assert_equal "Rack::Runtime", middleware.fourth
+ end
+
test "insert middleware before" do
add_to_config "config.middleware.insert_before ActionDispatch::Static, Rack::Config"
boot!

0 comments on commit 81c5684

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