diff options
author | Robin Bobbitt <ryehle@us.ibm.com> | 2017-06-13 12:46:02 -0400 |
---|---|---|
committer | Robin Bobbitt <ryehle@us.ibm.com> | 2017-06-14 11:40:21 -0400 |
commit | e09ddc62b32256baa3a0676e0fd68b38e72cafcd (patch) | |
tree | a583b0927d22ebb2a122ceaaacc7a1e767b81a54 /spec/helpers | |
parent | 5bea82de7f4e601e4c69cf5de718514c17286994 (diff) | |
download | gitlab-ce-e09ddc62b32256baa3a0676e0fd68b38e72cafcd.tar.gz |
Help landing page customizations
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/application_helper_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 49df91b236f..b91afcc5a25 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -257,4 +257,21 @@ describe ApplicationHelper do it { expect(helper.active_when(true)).to eq('active') } it { expect(helper.active_when(false)).to eq(nil) } end + + describe '#support_url' do + context 'when alternate support url is specified' do + let(:alternate_url) { 'http://company.example.com/getting-help' } + before { allow(current_application_settings).to receive(:help_page_support_url) { alternate_url } } + + it 'returns the alternate support url' do + expect(helper.support_url).to eq(alternate_url) + end + end + + context 'when alternate support url is not specified' do + it 'builds the support url from the promo_url' do + expect(helper.support_url).to eq(helper.promo_url + '/getting-help/') + end + end + end end |