class ForceSSLCustomOptionsTest
Public Instance Methods
setup()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 118 def setup @request.env["HTTP_HOST"] = "www.example.com:80" end
test_redirect_to_custom_alert()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 168 def test_redirect_to_custom_alert get :redirect_alert assert_response 301 assert_equal "https://www.example.com/force_ssl_custom_options/redirect_alert", redirect_to_url get :use_alert assert_response 200 assert_equal "Foo, Bar!", @response.body end
test_redirect_to_custom_domain()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 140 def test_redirect_to_custom_domain get :redirect_domain assert_response 301 assert_equal "https://www.secure.com/force_ssl_custom_options/redirect_domain", redirect_to_url end
test_redirect_to_custom_flash()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 158 def test_redirect_to_custom_flash get :redirect_flash assert_response 301 assert_equal "https://www.example.com/force_ssl_custom_options/redirect_flash", redirect_to_url get :use_flash assert_response 200 assert_equal "Foo, Bar!", @response.body end
test_redirect_to_custom_host()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 122 def test_redirect_to_custom_host get :redirect_host assert_response 301 assert_equal "https://secure.example.com/force_ssl_custom_options/redirect_host", redirect_to_url end
test_redirect_to_custom_notice()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 178 def test_redirect_to_custom_notice get :redirect_notice assert_response 301 assert_equal "https://www.example.com/force_ssl_custom_options/redirect_notice", redirect_to_url get :use_notice assert_response 200 assert_equal "Foo, Bar!", @response.body end
test_redirect_to_custom_path()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 146 def test_redirect_to_custom_path get :redirect_path assert_response 301 assert_equal "https://www.example.com/foo", redirect_to_url end
test_redirect_to_custom_port()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 128 def test_redirect_to_custom_port get :redirect_port assert_response 301 assert_equal "https://www.example.com:8443/force_ssl_custom_options/redirect_port", redirect_to_url end
test_redirect_to_custom_status()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 152 def test_redirect_to_custom_status get :redirect_status assert_response 302 assert_equal "https://www.example.com/force_ssl_custom_options/redirect_status", redirect_to_url end
test_redirect_to_custom_subdomain()
click to toggle source
# File actionpack/test/controller/force_ssl_test.rb, line 134 def test_redirect_to_custom_subdomain get :redirect_subdomain assert_response 301 assert_equal "https://secure.example.com/force_ssl_custom_options/redirect_subdomain", redirect_to_url end