diff options
author | Justin Leitgeb <justin@stackbuilders.com> | 2011-09-26 22:22:52 -0400 |
---|---|---|
committer | Justin Leitgeb <justin@stackbuilders.com> | 2011-09-26 22:22:52 -0400 |
commit | cb5c39f8a0af78e933d1fe0456c112db1e97813f (patch) | |
tree | 7ef01cf82a7e0603542073aeacb1a4a794047368 /railties/test | |
parent | 01e5e2faebb4a8082d38eb585762dc16ce3698f7 (diff) | |
download | rails-cb5c39f8a0af78e933d1fe0456c112db1e97813f.tar.gz rails-cb5c39f8a0af78e933d1fe0456c112db1e97813f.tar.bz2 rails-cb5c39f8a0af78e933d1fe0456c112db1e97813f.zip |
Make the Rack::SSL middleware configurable
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/middleware_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index bed5ba503f..093cb6ca2a 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -69,6 +69,14 @@ module ApplicationTests assert middleware.include?("Rack::SSL") end + test "Rack::SSL is configured with options when given" do + add_to_config "config.force_ssl = true" + add_to_config "config.ssl_options = { :host => 'example.com' }" + boot! + + assert_equal AppTemplate::Application.middleware.first.args, [{:host => 'example.com'}] + end + test "removing Active Record omits its middleware" do use_frameworks [] boot! |