diff options
Diffstat (limited to 'spec/features/users/one_trust_csp_spec.rb')
-rw-r--r-- | spec/features/users/one_trust_csp_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/users/one_trust_csp_spec.rb b/spec/features/users/one_trust_csp_spec.rb new file mode 100644 index 00000000000..382a0b4be6c --- /dev/null +++ b/spec/features/users/one_trust_csp_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'OneTrust content security policy' do + let(:user) { create(:user) } + + before do + stub_config(extra: { one_trust_id: SecureRandom.uuid }) + end + + it 'has proper Content Security Policy headers' do + visit root_path + + expect(response_headers['Content-Security-Policy']).to include('https://cdn.cookielaw.org https://*.onetrust.com') + end +end |