Commit cf63e25b authored by Dallas Reedy's avatar Dallas Reedy

Add missing ApplicationHelper specs for promo URLs

parent 38d58208
......@@ -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