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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-06 00:08:27 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-06 00:08:27 +0300
commit908a54b62497377af7b0e307197b2ea930dbc4f0 (patch)
tree311261a02ca8583a7d1835b4e0d198b8ac1b320e /spec/views/layouts
parentaee8d27430f12f9b5bcdbbee4165b9fbc240d3e3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views/layouts')
-rw-r--r--spec/views/layouts/_head.html.haml_spec.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/views/layouts/_head.html.haml_spec.rb b/spec/views/layouts/_head.html.haml_spec.rb
index 59406bca813..7011fa23327 100644
--- a/spec/views/layouts/_head.html.haml_spec.rb
+++ b/spec/views/layouts/_head.html.haml_spec.rb
@@ -64,18 +64,25 @@ describe 'layouts/_head' do
context 'when an asset_host is set and snowplow url is set' do
let(:asset_host) { 'http://test.host' }
+ let(:snowplow_collector_hostname) { 'www.snow.plow' }
before do
allow(ActionController::Base).to receive(:asset_host).and_return(asset_host)
allow(Gitlab::CurrentSettings).to receive(:snowplow_enabled?).and_return(true)
- allow(Gitlab::CurrentSettings).to receive(:snowplow_collector_hostname).and_return('www.snow.plow')
+ allow(Gitlab::CurrentSettings).to receive(:snowplow_collector_hostname).and_return(snowplow_collector_hostname)
end
it 'adds a snowplow script tag with asset host' do
render
expect(rendered).to match('http://test.host/assets/snowplow/')
expect(rendered).to match('window.snowplow')
- expect(rendered).to match('www.snow.plow')
+ expect(rendered).to match(snowplow_collector_hostname)
+ end
+
+ it 'adds a link preconnect tag' do
+ render
+
+ expect(rendered).to match(%Q(<link crossorigin="" href="#{snowplow_collector_hostname}" rel="preconnect">))
end
end