Commit a83951a5 authored by vvempati's avatar vvempati

Clean up usages of subscriptions plans url

- Replace usages of subscriptions_plans_url with pricing URLs
- Remove definition for unused subscriptions_plans_url
- Update tests for the above clean up
parent f8040dc5
......@@ -56,7 +56,7 @@ module LicenseHelper
# EE:Self Managed
def cloud_license_view_data
{
buy_subscription_path: ::EE::SUBSCRIPTIONS_PLANS_URL,
buy_subscription_path: Gitlab::Saas.about_pricing_url,
customers_portal_url: ::EE::SUBSCRIPTIONS_MANAGE_URL,
free_trial_path: new_trial_url,
has_active_license: (has_active_license? ? 'true' : 'false'),
......
- if show_upgrade_link?(current_user)
%li
= link_to EE::SUBSCRIPTIONS_PLANS_URL,
= link_to Gitlab::Saas.about_pricing_url,
class: 'upgrade-plan-link js-upgrade-plan-link',
data: { 'track-action': 'click_upgrade_link', 'track-label': current_user.namespace.actual_plan_name, 'track-property': 'user_dropdown' } do
= s_("CurrentUser|Upgrade")
......
......@@ -24,7 +24,7 @@
= s_('Promotions|When you have a lot of issues, it can be hard to get an overview. By adding a weight to your issues, you can get a better idea of the effort, cost, required time, or value of each, and so better manage them.')
%p
- if Gitlab::CurrentSettings.should_check_namespace_plan?
- subscription_link_url = EE::SUBSCRIPTIONS_PLANS_URL
- subscription_link_url = Gitlab::Saas.about_pricing_url
- subscription_link_start = '<a href="%{url}" target="_blank" class="btn-link tr-issue-weights-bronze-features-cta">'.html_safe % { url: subscription_link_url }
= s_("Promotions|See the other features in the %{subscription_link_start}Premium plan%{subscription_link_end}").html_safe % { subscription_link_start: subscription_link_start, subscription_link_end: '</a>'.html_safe }
- else
......
......@@ -15,7 +15,7 @@
- elsif current_user&.admin?
-# EE:Self Managed
- if License.current&.expired?
= link_to (!short_form ? s_('Promotions|Buy GitLab Enterprise Edition') : s_('Promotions|Buy EE')), ::EE::SUBSCRIPTIONS_PLANS_URL, class: 'btn gl-button btn-confirm'
= link_to (!short_form ? s_('Promotions|Buy GitLab Enterprise Edition') : s_('Promotions|Buy EE')), Gitlab::Saas.about_pricing_url, class: 'btn gl-button btn-confirm'
- else
= link_to s_('Promotions|Start GitLab Ultimate trial'), new_trial_url, class: 'gl-button btn btn-confirm gl-mb-3'
- else
......
......@@ -7,7 +7,6 @@ module EE
SUBSCRIPTIONS_MORE_MINUTES_URL = ::Gitlab::SubscriptionPortal.subscriptions_more_minutes_url.freeze
SUBSCRIPTIONS_MORE_STORAGE_URL = ::Gitlab::SubscriptionPortal.subscriptions_more_storage_url.freeze
SUBSCRIPTIONS_MANAGE_URL = ::Gitlab::SubscriptionPortal.subscriptions_manage_url.freeze
SUBSCRIPTIONS_PLANS_URL = ::Gitlab::SubscriptionPortal.subscriptions_plans_url.freeze
SUBSCRIPTIONS_GITLAB_PLANS_URL = ::Gitlab::SubscriptionPortal.subscriptions_gitlab_plans_url.freeze
SUBSCRIPTIONS_EDIT_ACCOUNT_URL = ::Gitlab::SubscriptionPortal.edit_account_url.freeze
SUBSCRIPTION_PORTAL_ADMIN_EMAIL = ::Gitlab::SubscriptionPortal.subscription_portal_admin_email.freeze
......
......@@ -82,7 +82,6 @@ RSpec.describe LicenseHelper do
describe '#cloud_license_view_data' do
before do
stub_const('::EE::SUBSCRIPTIONS_MANAGE_URL', 'subscriptions_manage_url')
stub_const('::EE::SUBSCRIPTIONS_PLANS_URL', 'subscriptions_plans_url')
allow(helper).to receive(:new_trial_url).and_return('new_trial_url')
end
......@@ -96,7 +95,7 @@ RSpec.describe LicenseHelper do
expect(helper.cloud_license_view_data).to eq({ has_active_license: 'true',
customers_portal_url: 'subscriptions_manage_url',
free_trial_path: 'new_trial_url',
buy_subscription_path: 'subscriptions_plans_url',
buy_subscription_path: Gitlab::Saas.about_pricing_url,
subscription_sync_path: sync_seat_link_admin_license_path,
license_remove_path: admin_license_path,
congratulation_svg_path: helper.image_path('illustrations/illustration-congratulation-purchase.svg'),
......@@ -112,7 +111,7 @@ RSpec.describe LicenseHelper do
expect(helper.cloud_license_view_data).to eq({ has_active_license: 'false',
customers_portal_url: 'subscriptions_manage_url',
free_trial_path: 'new_trial_url',
buy_subscription_path: 'subscriptions_plans_url',
buy_subscription_path: Gitlab::Saas.about_pricing_url,
subscription_sync_path: sync_seat_link_admin_license_path,
license_remove_path: admin_license_path,
congratulation_svg_path: helper.image_path('illustrations/illustration-congratulation-purchase.svg'),
......
......@@ -42,10 +42,6 @@ module Gitlab
"#{self.subscriptions_url}/subscriptions"
end
def self.subscriptions_plans_url
Gitlab::Saas.about_pricing_url
end
def self.subscriptions_gitlab_plans_url
"#{self.subscriptions_url}/gitlab_plans"
end
......
......@@ -61,7 +61,6 @@ RSpec.describe ::Gitlab::SubscriptionPortal do
:subscriptions_more_minutes_url | 'https://customers.staging.gitlab.com/buy_pipeline_minutes'
:subscriptions_more_storage_url | 'https://customers.staging.gitlab.com/buy_storage'
:subscriptions_manage_url | 'https://customers.staging.gitlab.com/subscriptions'
:subscriptions_plans_url | 'https://about.gitlab.com/pricing/'
:subscriptions_instance_review_url | 'https://customers.staging.gitlab.com/instance_review'
:subscriptions_gitlab_plans_url | 'https://customers.staging.gitlab.com/gitlab_plans'
:edit_account_url | 'https://customers.staging.gitlab.com/customers/edit'
......
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