From c49cc4ae35e583048d4fcde337e83aa86a3ef80c Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 18 Jan 2017 18:41:32 +0900 Subject: [PATCH] :warning: "Use assert_nil if expecting nil. This will fail in MT6." --- actionpack/test/dispatch/ssl_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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