diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-06-14 20:16:50 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-06-14 20:16:50 +0300 |
commit | 6bdfeff6e7bbd0584167096c2f868348d6291c69 (patch) | |
tree | 93b3b820084207ca1c85f365ccb029189d8ad823 /spec/helpers | |
parent | 5771b946c2e68fd4b9a8ff040c168b568b68a586 (diff) | |
parent | e09ddc62b32256baa3a0676e0fd68b38e72cafcd (diff) |
Merge branch 'help-landing-page-customizations' into 'master'
Allow more customization to Help landing page
See merge request !11878
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 |