diff options
Diffstat (limited to 'spec/helpers/application_helper_spec.rb')
-rw-r--r-- | spec/helpers/application_helper_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index c7470f31ad8..ae039c1a8b1 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -168,11 +168,13 @@ RSpec.describe ApplicationHelper do it { expect(helper.active_when(false)).to eq(nil) } end - describe '#promo_host' do - subject { helper.promo_host } + unless Gitlab.jh? + describe '#promo_host' do + subject { helper.promo_host } - it 'returns the url' do - is_expected.to eq('about.gitlab.com') + it 'returns the url' do + is_expected.to eq('about.gitlab.com') + end end end @@ -180,7 +182,7 @@ RSpec.describe ApplicationHelper do subject { helper.promo_url } it 'returns the url' do - is_expected.to eq('https://about.gitlab.com') + is_expected.to eq("https://#{helper.promo_host}") end it 'changes if promo_host changes' do @@ -194,7 +196,7 @@ RSpec.describe ApplicationHelper do subject { helper.contact_sales_url } it 'returns the url' do - is_expected.to eq('https://about.gitlab.com/sales') + is_expected.to eq("https://#{helper.promo_host}/sales") end it 'changes if promo_url changes' do @@ -316,9 +318,7 @@ RSpec.describe ApplicationHelper do let(:user) { create(:user, static_object_token: 'hunter1') } before do - allow_next_instance_of(ApplicationSetting) do |instance| - allow(instance).to receive(:static_objects_external_storage_url).and_return('https://cdn.gitlab.com') - end + stub_application_setting(static_objects_external_storage_url: 'https://cdn.gitlab.com') allow(helper).to receive(:current_user).and_return(user) end |