Commit 7967c98b authored by Vitaly Slobodin's avatar Vitaly Slobodin Committed by Matthias Käppler

Expose CustomersDot variables via gon on gl.com

parent a309f510
...@@ -10,6 +10,11 @@ module EE ...@@ -10,6 +10,11 @@ module EE
super super
gon.roadmap_epics_limit = 1000 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 end
# Exposes if a licensed feature is available. # Exposes if a licensed feature is available.
......
...@@ -25,6 +25,19 @@ RSpec.describe EE::Gitlab::GonHelper do ...@@ -25,6 +25,19 @@ RSpec.describe EE::Gitlab::GonHelper do
helper.add_gon_variables helper.add_gon_variables
end 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 end
describe '#push_licensed_feature' do 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