diff options
Diffstat (limited to 'railties/test/application/configuration_test.rb')
-rw-r--r-- | railties/test/application/configuration_test.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 7e3bd26212..c409f1ea79 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -1532,5 +1532,24 @@ module ApplicationTests assert_equal :default, Rails.configuration.debug_exception_response_format end + + test "controller force_ssl declaration can be used even if session_store is disabled" do + make_basic_app do |application| + application.config.session_store :disabled + end + + class ::OmgController < ActionController::Base + force_ssl + + def index + render plain: "Yay! You're on Rails!" + end + end + + get "/" + + assert_equal 301, last_response.status + assert_equal "https://example.org/", last_response.location + end end end |