Commit 30ffdabf authored by dcouture's avatar dcouture

Rename helper to reflect its new role

It handles more than the `defer` attribute now so it's
renamed to GitlabScriptTagHelper
parent 79945d29
# frozen_string_literal: true
module DeferScriptTagHelper
module GitlabScriptTagHelper
# Override the default ActionView `javascript_include_tag` helper to support page specific deferred loading.
# PLEASE NOTE: `defer` is also critical so that we don't run JavaScript entrypoints before the DOM is ready.
# Please see https://gitlab.com/groups/gitlab-org/-/epics/4538#note_432159769.
......
......@@ -2,9 +2,9 @@
require 'spec_helper'
RSpec.describe DeferScriptTagHelper do
RSpec.describe GitlabScriptTagHelper do
before do
allow_any_instance_of(DeferScriptTagHelper).to receive(:content_security_policy_nonce).and_return('noncevalue')
allow_any_instance_of(GitlabScriptTagHelper).to receive(:content_security_policy_nonce).and_return('noncevalue')
end
describe 'external script tag' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment