diff options
Diffstat (limited to 'spec/helpers/application_helper_spec.rb')
-rw-r--r-- | spec/helpers/application_helper_spec.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 08107b841d7..ce4e73bdc55 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -168,6 +168,42 @@ RSpec.describe ApplicationHelper do it { expect(helper.active_when(false)).to eq(nil) } end + describe '#promo_host' do + subject { helper.promo_host } + + it 'returns the url' do + is_expected.to eq('about.gitlab.com') + end + end + + describe '#promo_url' do + subject { helper.promo_url } + + it 'returns the url' do + is_expected.to eq('https://about.gitlab.com') + end + + it 'changes if promo_host changes' do + allow(helper).to receive(:promo_host).and_return('foobar.baz') + + is_expected.to eq('https://foobar.baz') + end + end + + describe '#contact_sales_url' do + subject { helper.contact_sales_url } + + it 'returns the url' do + is_expected.to eq('https://about.gitlab.com/sales') + end + + it 'changes if promo_url changes' do + allow(helper).to receive(:promo_url).and_return('https://somewhere.else') + + is_expected.to eq('https://somewhere.else/sales') + end + end + describe '#support_url' do context 'when alternate support url is specified' do let(:alternate_url) { 'http://company.example.com/getting-help' } |