summaryrefslogtreecommitdiff
path: root/spec/features/users/one_trust_csp_spec.rb
blob: 382a0b4be6c7f277575ef88cd53e674e303937a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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