summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-06-14 17:16:50 +0000
committerDouwe Maan <douwe@gitlab.com>2017-06-14 17:16:50 +0000
commit6bdfeff6e7bbd0584167096c2f868348d6291c69 (patch)
tree93b3b820084207ca1c85f365ccb029189d8ad823 /spec/helpers
parent5771b946c2e68fd4b9a8ff040c168b568b68a586 (diff)
parente09ddc62b32256baa3a0676e0fd68b38e72cafcd (diff)
downloadgitlab-ce-6bdfeff6e7bbd0584167096c2f868348d6291c69.tar.gz
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.rb17
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