diff --git a/spec/lib/secure_headers/headers/content_security_policy_spec.rb b/spec/lib/secure_headers/headers/content_security_policy_spec.rb index 39f0b5a9..fc9ff4b6 100644 --- a/spec/lib/secure_headers/headers/content_security_policy_spec.rb +++ b/spec/lib/secure_headers/headers/content_security_policy_spec.rb @@ -64,8 +64,9 @@ def request_for user_agent, request_uri=nil, options={:ssl => false} it "imports JSON to build a policy" do json1 = %({"default-src":["https:"],"script-src":["'unsafe-inline'","'unsafe-eval'","https:","data:"]}) - json2 = %({"style-src":["'unsafe-inline'","https:","about:"],"img-src":["https:","data:"]}) - config = ContentSecurityPolicy.from_json(json1, json2) + json2 = %({"style-src":["'unsafe-inline'"],"img-src":["https:","data:"]}) + json3 = %({"style-src":["https:","about:"]}) + config = ContentSecurityPolicy.from_json(json1, json2, json3) policy = ContentSecurityPolicy.new(config.merge(:disable_fill_missing => true)) expected = %({"default-src":["https:"],"script-src":["'unsafe-inline'","'unsafe-eval'","https:","data:"],"style-src":["'unsafe-inline'","https:","about:"],"img-src":["https:","data:"]})