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-03-19 18:09:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-19 18:09:41 +0300
commit78d8830cec030ff12afed3c8ae1dddec454d0a24 (patch)
treeb5494f60c7d28be787eee7872fd3d99dcbf9f8c8 /spec/views
parent652bd073731b0028641672a75355c7918b5ac116 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/layouts/_head.html.haml_spec.rb25
1 files changed, 6 insertions, 19 deletions
diff --git a/spec/views/layouts/_head.html.haml_spec.rb b/spec/views/layouts/_head.html.haml_spec.rb
index f181e18e53d..8d7dcfc2416 100644
--- a/spec/views/layouts/_head.html.haml_spec.rb
+++ b/spec/views/layouts/_head.html.haml_spec.rb
@@ -34,36 +34,23 @@ describe 'layouts/_head' do
expect(rendered).to match(%{content="foo&quot; http-equiv=&quot;refresh"})
end
- context 'when an asset_host is set and feature is activated in the config it will' do
+ context 'when an asset_host is set' do
let(:asset_host) { 'http://assets' }
before do
- stub_feature_flags(asset_host_prefetch: true)
allow(ActionController::Base).to receive(:asset_host).and_return(asset_host)
end
- it 'add a link dns-prefetch tag' do
+ it 'adds a link dns-prefetch tag' do
render
- expect(rendered).to match('<link href="http://assets" rel="dns-prefetch">')
- end
-
- it 'add a link preconnect tag' do
- render
- expect(rendered).to match('<link crossorigin="" href="http://assets" rel="preconnnect">')
- end
- end
- context 'when an asset_host is set and feature is not activated in the config it will' do
- let(:asset_host) { 'http://assets' }
-
- before do
- stub_feature_flags(asset_host_prefetch: false)
- allow(ActionController::Base).to receive(:asset_host).and_return(asset_host)
+ expect(rendered).to match(%Q(<link href="#{asset_host}" rel="dns-prefetch">))
end
- it 'not add a link dns-prefetch tag' do
+ it 'adds a link preconnect tag' do
render
- expect(rendered).not_to match('<link href="http://assets" rel="dns-prefetch">')
+
+ expect(rendered).to match(%Q(<link crossorigin="" href="#{asset_host}" rel="preconnnect">))
end
end