Commit 663c3439 authored by Matthias Käppler's avatar Matthias Käppler

Merge branch 'vs-expose-customersdot-variables-via-gon' into 'master'

Expose CustomersDot variables via gon on gl.com

See merge request gitlab-org/gitlab!61400
parents 666264ae 7967c98b
......@@ -10,6 +10,11 @@ module EE
super
gon.roadmap_epics_limit = 1000
if ::Gitlab.dev_env_or_com?
gon.subscriptions_url = ::Gitlab::SubscriptionPortal::SUBSCRIPTIONS_URL
gon.payment_form_url = ::Gitlab::SubscriptionPortal::PAYMENT_FORM_URL
end
end
# Exposes if a licensed feature is available.
......
......@@ -25,6 +25,19 @@ RSpec.describe EE::Gitlab::GonHelper do
helper.add_gon_variables
end
context 'when GitLab.com' do
before do
allow(Gitlab).to receive(:dev_env_or_com?).and_return(true)
end
it 'includes CustomersDot variables' do
expect(gon).to receive(:subscriptions_url=).with(Gitlab::SubscriptionPortal::SUBSCRIPTIONS_URL)
expect(gon).to receive(:payment_form_url=).with(Gitlab::SubscriptionPortal::PAYMENT_FORM_URL)
helper.add_gon_variables
end
end
end
describe '#push_licensed_feature' do
......
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