mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
⚠️ "Use assert_nil if expecting nil. This will fail in MT6."
This commit is contained in:
parent
8c155c932f
commit
c49cc4ae35
1 changed files with 5 additions and 1 deletions
|
@ -102,8 +102,12 @@ 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
|
||||
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
|
||||
assert_hsts EXPECTED_WITH_SUBDOMAINS
|
||||
|
|
Loading…
Reference in a new issue