diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-06-11 17:44:06 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-06-11 17:44:06 -0300 |
commit | 21f7bcbaa7709ed072bb2e1273d25c09eeaa26d9 (patch) | |
tree | 14b91132cbe37e1b3bc6c8af41a8804b8163edac /railties/test/application/middleware_test.rb | |
parent | ed7d787e120347ebc97647014a5e1fef7a34c19c (diff) | |
parent | 51d5d6252ee093d3fa004abec79319ae8b4c42c4 (diff) | |
download | rails-21f7bcbaa7709ed072bb2e1273d25c09eeaa26d9.tar.gz rails-21f7bcbaa7709ed072bb2e1273d25c09eeaa26d9.tar.bz2 rails-21f7bcbaa7709ed072bb2e1273d25c09eeaa26d9.zip |
Merge pull request #19832 from spastorino/rails-api
Rails api
Diffstat (limited to 'railties/test/application/middleware_test.rb')
-rw-r--r-- | railties/test/application/middleware_test.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 04bd19784a..ce92ebbf66 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -50,6 +50,33 @@ module ApplicationTests ], middleware end + test "api middleware stack" do + add_to_config "config.api_only = true" + + boot! + + assert_equal [ + "Rack::Sendfile", + "ActionDispatch::Static", + "Rack::Lock", + "ActiveSupport::Cache::Strategy::LocalCache", + "Rack::Runtime", + "ActionDispatch::RequestId", + "Rails::Rack::Logger", # must come after Rack::MethodOverride to properly log overridden methods + "ActionDispatch::ShowExceptions", + "ActionDispatch::DebugExceptions", + "ActionDispatch::RemoteIp", + "ActionDispatch::Reloader", + "ActionDispatch::Callbacks", + "ActiveRecord::ConnectionAdapters::ConnectionManagement", + "ActiveRecord::QueryCache", + "ActionDispatch::ParamsParser", + "Rack::Head", + "Rack::ConditionalGet", + "Rack::ETag" + ], middleware + end + test "Rack::Cache is not included by default" do boot! |