Skip to content

Commit f40910c

Browse files
authored
add test for 'none' trusted type
1 parent 071c580 commit f40910c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/lib/secure_headers/headers/content_security_policy_spec.rb

+5
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ module SecureHeaders
196196
expect(csp.value).to eq("trusted-types blahblahpolicy")
197197
end
198198

199+
it "supports trusted-types directive with 'none'" do
200+
csp = ContentSecurityPolicy.new({trusted_types: %w(none)})
201+
expect(csp.value).to eq("trusted-types none")
202+
end
203+
199204
it "allows duplicate policy names in trusted-types directive" do
200205
csp = ContentSecurityPolicy.new({trusted_types: %w(blahblahpolicy 'allow-duplicates')})
201206
expect(csp.value).to eq("trusted-types blahblahpolicy 'allow-duplicates'")

0 commit comments

Comments
 (0)