debian-mirror-gitlab/spec/features/users/one_trust_csp_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
469 B
Ruby
Raw Normal View History

2022-01-26 12:08:38 +05:30
# frozen_string_literal: true
require 'spec_helper'
2023-03-04 22:38:38 +05:30
RSpec.describe 'OneTrust content security policy', feature_category: :application_instrumentation do
2022-01-26 12:08:38 +05:30
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