Commit a17fc062 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'add-missing-application-helper-specs' into 'master'

Add missing ApplicationHelper specs for promo URLs

See merge request gitlab-org/gitlab!38869
parents cc2b1f4f cf63e25b
......@@ -168,15 +168,38 @@ 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 'passes a smoke test' do
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment