aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/content_security_policy_test.rb
diff options
context:
space:
mode:
authorJeffrey Guenther <guenther.jeffrey@gmail.com>2017-12-08 13:25:54 -0800
committerJeffrey Guenther <guenther.jeffrey@gmail.com>2017-12-08 13:25:54 -0800
commita822287cefc38b9b8b3be38ffd775cd3d511b7c3 (patch)
treed69c6ea1fcc4299caa11bcbef2ce5520347a4f46 /actionpack/test/dispatch/content_security_policy_test.rb
parent08fab27db52aa375df85a23e89799600f785b9d4 (diff)
parentda8e0ba03cbae33857954c0c1a228bd6dae562da (diff)
downloadrails-a822287cefc38b9b8b3be38ffd775cd3d511b7c3.tar.gz
rails-a822287cefc38b9b8b3be38ffd775cd3d511b7c3.tar.bz2
rails-a822287cefc38b9b8b3be38ffd775cd3d511b7c3.zip
Merge branch 'master' into activestorage-guide
Diffstat (limited to 'actionpack/test/dispatch/content_security_policy_test.rb')
-rw-r--r--actionpack/test/dispatch/content_security_policy_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/content_security_policy_test.rb b/actionpack/test/dispatch/content_security_policy_test.rb
index 8a1ac066e8..7c4a65a633 100644
--- a/actionpack/test/dispatch/content_security_policy_test.rb
+++ b/actionpack/test/dispatch/content_security_policy_test.rb
@@ -14,6 +14,15 @@ class ContentSecurityPolicyTest < ActiveSupport::TestCase
assert_equal "script-src 'self';", @policy.build
end
+ def test_dup
+ @policy.img_src :self
+ @policy.block_all_mixed_content
+ @policy.upgrade_insecure_requests
+ @policy.sandbox
+ copied = @policy.dup
+ assert_equal copied.build, @policy.build
+ end
+
def test_mappings
@policy.script_src :data
assert_equal "script-src data:;", @policy.build