class RedirectToSSLTest
Public Instance Methods
test_banana_redirects_to_https_if_not_https()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 306 def test_banana_redirects_to_https_if_not_https get :banana assert_response 301 assert_equal "https://test.host/redirect_to_ssl/banana", redirect_to_url end
test_cheeseburgers_does_not_redirect_if_already_https()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 318 def test_cheeseburgers_does_not_redirect_if_already_https request.env["HTTPS"] = "on" get :cheeseburger assert_response 200 assert_equal "ihaz", response.body end
test_cheeseburgers_redirects_to_https_with_new_host_if_not_https()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 312 def test_cheeseburgers_redirects_to_https_with_new_host_if_not_https get :cheeseburger assert_response 301 assert_equal "https://secure.cheeseburger.host/redirect_to_ssl/cheeseburger", redirect_to_url end