From 68fa4de6e39dfa036bb74eeb01fa569c716aacdf Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sat, 19 Mar 2016 12:30:00 -0700 Subject: Make HTTP(s) label consistent on clone bar Sites that use http:// for the external_url should always display HTTP on the clone bar. Similarly, sites that use https:// should show HTTPS. --- spec/helpers/projects_helper_spec.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'spec/helpers') diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index 53207767581..86cbd29830c 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -94,4 +94,23 @@ describe ProjectsHelper do end end end + + describe 'default_clone_protocol' do + describe 'using HTTP' do + it 'returns HTTP' do + expect(helper).to receive(:current_user).and_return(nil) + + expect(helper.send(:default_clone_protocol)).to eq('http') + end + end + + describe 'using HTTPS' do + it 'returns HTTPS' do + allow(Gitlab.config.gitlab).to receive(:protocol).and_return('https') + expect(helper).to receive(:current_user).and_return(nil) + + expect(helper.send(:default_clone_protocol)).to eq('https') + end + end + end end -- cgit v1.2.3 From 367818d2934af8f3eb7313147198801d021445e5 Mon Sep 17 00:00:00 2001 From: Arinde Eniola Date: Sun, 20 Mar 2016 20:01:46 +0100 Subject: change the css class has_tooltip to has-tooltip universally --- spec/helpers/labels_helper_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/helpers') diff --git a/spec/helpers/labels_helper_spec.rb b/spec/helpers/labels_helper_spec.rb index eca8bc8ab2d..39042ff7e91 100644 --- a/spec/helpers/labels_helper_spec.rb +++ b/spec/helpers/labels_helper_spec.rb @@ -11,7 +11,7 @@ describe LabelsHelper do end it 'uses the instance variable' do - expect(link_to_label(label)).to match %r{} + expect(link_to_label(label)).to match %r{} end end @@ -41,8 +41,8 @@ describe LabelsHelper do context 'with a tooltip argument' do context 'set to false' do - it 'does not include the has_tooltip class' do - expect(link_to_label(label, tooltip: false)).not_to match %r{has_tooltip} + it 'does not include the has-tooltip class' do + expect(link_to_label(label, tooltip: false)).not_to match %r{has-tooltip} end end end -- cgit v1.2.3