Methods
- A
- D
- T
-
- test_allows_https_proxy_header_url,
- test_allows_https_url,
- test_disable_hsts_header,
- test_flag_cookies_as_secure,
- test_flag_cookies_as_secure_at_end_of_line,
- test_flag_cookies_as_secure_with_has_not_spaces_after,
- test_flag_cookies_as_secure_with_has_not_spaces_before,
- test_flag_cookies_as_secure_with_ignore_case,
- test_flag_cookies_as_secure_with_more_spaces_after,
- test_flag_cookies_as_secure_with_more_spaces_before,
- test_hsts_expires,
- test_hsts_expires_with_duration,
- test_hsts_header,
- test_hsts_header_by_default,
- test_hsts_include_subdomains,
- test_keeps_original_headers_behavior,
- test_no_cookies,
- test_no_hsts_with_insecure_connection,
- test_redirect_to_host,
- test_redirect_to_host_and_port,
- test_redirect_to_host_with_port,
- test_redirect_to_port,
- test_redirect_to_secure_host_when_on_subdomain,
- test_redirect_to_secure_subdomain_when_on_deep_subdomain,
- test_redirects_http_to_https
Attributes
| [W] | app |
Instance Public methods
app()
Link
default_app()
Link
test_allows_https_proxy_header_url()
Link
test_allows_https_url()
Link
test_disable_hsts_header()
Link
test_hsts_expires()
Link
test_hsts_expires_with_duration()
Link
# File actionpack/test/dispatch/ssl_test.rb, line 65 def test_hsts_expires_with_duration self.app = ActionDispatch::SSL.new(default_app, :hsts => { :expires => 1.year }) get "https://example.org/" assert_equal "max-age=31557600", response.headers['Strict-Transport-Security'] end
test_hsts_header()
Link
test_hsts_header_by_default()
Link
test_hsts_include_subdomains()
Link
# File actionpack/test/dispatch/ssl_test.rb, line 72 def test_hsts_include_subdomains self.app = ActionDispatch::SSL.new(default_app, :hsts => { :subdomains => true }) get "https://example.org/" assert_equal "max-age=31536000; includeSubDomains", response.headers['Strict-Transport-Security'] end
test_keeps_original_headers_behavior()
Link
# File actionpack/test/dispatch/ssl_test.rb, line 220 def test_keeps_original_headers_behavior headers = Rack::Utils::HeaderHash.new( "Content-Type" => "text/html", "Connection" => ["close"] ) self.app = ActionDispatch::SSL.new(lambda { |env| [200, headers, ["OK"]] }) get "https://example.org/" assert_equal "close", response.headers["Connection"] end
test_no_hsts_with_insecure_connection()
Link
test_redirect_to_host()
Link
# File actionpack/test/dispatch/ssl_test.rb, line 178 def test_redirect_to_host self.app = ActionDispatch::SSL.new(default_app, :host => "ssl.example.org") get "http://example.org/path?key=value" assert_equal "https://ssl.example.org/path?key=value", response.headers['Location'] end
test_redirect_to_host_and_port()
Link
# File actionpack/test/dispatch/ssl_test.rb, line 192 def test_redirect_to_host_and_port self.app = ActionDispatch::SSL.new(default_app, :host => "ssl.example.org", :port => 8443) get "http://example.org/path?key=value" assert_equal "https://ssl.example.org:8443/path?key=value", response.headers['Location'] end
test_redirect_to_host_with_port()
Link
# File actionpack/test/dispatch/ssl_test.rb, line 199 def test_redirect_to_host_with_port self.app = ActionDispatch::SSL.new(default_app, :host => "ssl.example.org:443") get "http://example.org/path?key=value" assert_equal "https://ssl.example.org:443/path?key=value", response.headers['Location'] end
test_redirect_to_port()
Link
test_redirect_to_secure_host_when_on_subdomain()
Link
# File actionpack/test/dispatch/ssl_test.rb, line 206 def test_redirect_to_secure_host_when_on_subdomain self.app = ActionDispatch::SSL.new(default_app, :host => "ssl.example.org") get "http://ssl.example.org/path?key=value" assert_equal "https://ssl.example.org/path?key=value", response.headers['Location'] end
test_redirect_to_secure_subdomain_when_on_deep_subdomain()
Link
# File actionpack/test/dispatch/ssl_test.rb, line 213 def test_redirect_to_secure_subdomain_when_on_deep_subdomain self.app = ActionDispatch::SSL.new(default_app, :host => "example.co.uk") get "http://double.rainbow.what.does.it.mean.example.co.uk/path?key=value" assert_equal "https://example.co.uk/path?key=value", response.headers['Location'] end