Welcome to mirror list, hosted at ThFree Co, Russian Federation.

one_trust_csp_spec.rb « users « features « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c22fd26f2e898f91e14e4ab96d1b64725c7961f5 (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', feature_category: :application_instrumentation 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