aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/ssl_test.rb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2017-01-18 18:41:32 +0900
committerAkira Matsuda <ronnie@dio.jp>2017-01-18 18:41:32 +0900
commitc49cc4ae35e583048d4fcde337e83aa86a3ef80c (patch)
tree1a872fbf6ce0784ba15ddb108b9c54c3ad206b6d /actionpack/test/dispatch/ssl_test.rb
parent8c155c932f37fd2de5b530bc076ed60a03bc926c (diff)
downloadrails-c49cc4ae35e583048d4fcde337e83aa86a3ef80c.tar.gz
rails-c49cc4ae35e583048d4fcde337e83aa86a3ef80c.tar.bz2
rails-c49cc4ae35e583048d4fcde337e83aa86a3ef80c.zip
:warning: "Use assert_nil if expecting nil. This will fail in MT6."
Diffstat (limited to 'actionpack/test/dispatch/ssl_test.rb')
-rw-r--r--actionpack/test/dispatch/ssl_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/ssl_test.rb b/actionpack/test/dispatch/ssl_test.rb
index 53b99ebbc4..757e26973f 100644
--- a/actionpack/test/dispatch/ssl_test.rb
+++ b/actionpack/test/dispatch/ssl_test.rb
@@ -102,7 +102,11 @@ class StrictTransportSecurityTest < SSLTest
def assert_hsts(expected, url: "https://example.org", hsts: { subdomains: true }, headers: {})
self.app = build_app ssl_options: { hsts: hsts }, headers: headers
get url
- assert_equal expected, response.headers["Strict-Transport-Security"]
+ if expected.nil?
+ assert_nil response.headers["Strict-Transport-Security"]
+ else
+ assert_equal expected, response.headers["Strict-Transport-Security"]
+ end
end
test "enabled by default" do