diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-01-04 16:14:24 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-01-04 16:20:23 +0000 |
commit | add4375a603850518c93edc2b4d0334a80b5e73d (patch) | |
tree | 831e5299f194e25c0d98bed4b436b60c74634e16 /actionpack/test/dispatch | |
parent | e752cb49f690bfbc5a8856af5afdedfce2de33bb (diff) | |
download | rails-add4375a603850518c93edc2b4d0334a80b5e73d.tar.gz rails-add4375a603850518c93edc2b4d0334a80b5e73d.tar.bz2 rails-add4375a603850518c93edc2b4d0334a80b5e73d.zip |
Allow use of durations for ActionDispatch::SSL configuration
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/ssl_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/ssl_test.rb b/actionpack/test/dispatch/ssl_test.rb index b4a39219bf..a9bea7ea73 100644 --- a/actionpack/test/dispatch/ssl_test.rb +++ b/actionpack/test/dispatch/ssl_test.rb @@ -57,6 +57,13 @@ class SSLTest < ActionDispatch::IntegrationTest response.headers['Strict-Transport-Security'] end + 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 + def test_hsts_include_subdomains self.app = ActionDispatch::SSL.new(default_app, :hsts => { :subdomains => true }) get "https://example.org/" |