Skip to content

Commit 830b4b2

Browse files
committed
Add all headers to expect_default_values
1 parent f217d19 commit 830b4b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/spec_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
def expect_default_values(hash)
2828
expect(hash[SecureHeaders::ContentSecurityPolicyConfig::HEADER_NAME]).to eq("default-src 'self' https:; font-src 'self' https: data:; img-src 'self' https: data:; object-src 'none'; script-src https:; style-src 'self' https: 'unsafe-inline'")
29+
expect(hash[SecureHeaders::ContentSecurityPolicyReportOnlyConfig::HEADER_NAME]).to be_nil
2930
expect(hash[SecureHeaders::XFrameOptions::HEADER_NAME]).to eq(SecureHeaders::XFrameOptions::DEFAULT_VALUE)
3031
expect(hash[SecureHeaders::XDownloadOptions::HEADER_NAME]).to eq(SecureHeaders::XDownloadOptions::DEFAULT_VALUE)
3132
expect(hash[SecureHeaders::StrictTransportSecurity::HEADER_NAME]).to eq(SecureHeaders::StrictTransportSecurity::DEFAULT_VALUE)
@@ -34,6 +35,9 @@ def expect_default_values(hash)
3435
expect(hash[SecureHeaders::XPermittedCrossDomainPolicies::HEADER_NAME]).to eq(SecureHeaders::XPermittedCrossDomainPolicies::DEFAULT_VALUE)
3536
expect(hash[SecureHeaders::ReferrerPolicy::HEADER_NAME]).to be_nil
3637
expect(hash[SecureHeaders::ExpectCertificateTransparency::HEADER_NAME]).to be_nil
38+
expect(hash[SecureHeaders::ClearSiteData::HEADER_NAME]).to be_nil
39+
expect(hash[SecureHeaders::ExpectCertificateTransparency::HEADER_NAME]).to be_nil
40+
expect(hash[SecureHeaders::PublicKeyPins::HEADER_NAME]).to be_nil
3741
end
3842

3943
module SecureHeaders

0 commit comments

Comments
 (0)