提交 c49cc4ae 编写于 作者: A Akira Matsuda

"Use assert_nil if expecting nil. This will fail in MT6."

上级 8c155c93
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册