Commit 431c4042 authored by Fabio Pitino's avatar Fabio Pitino

Merge branch '246483-fix-spec-subscription-portal-url' into 'master'

Fix subscription portal URLs in specs

Closes #246483

See merge request gitlab-org/gitlab!41646
parents e3f00dc3 d30b7420
...@@ -18,7 +18,7 @@ RSpec.describe 'Groups > Billing', :js do ...@@ -18,7 +18,7 @@ RSpec.describe 'Groups > Billing', :js do
end end
before do before do
stub_full_request("https://customers.gitlab.com/gitlab_plans?plan=#{plan}") stub_full_request("#{EE::SUBSCRIPTIONS_URL}/gitlab_plans?plan=#{plan}")
.to_return(status: 200, body: File.new(Rails.root.join('ee/spec/fixtures/gitlab_com_plans.json'))) .to_return(status: 200, body: File.new(Rails.root.join('ee/spec/fixtures/gitlab_com_plans.json')))
allow(Gitlab).to receive(:com?).and_return(true) allow(Gitlab).to receive(:com?).and_return(true)
......
...@@ -12,7 +12,7 @@ RSpec.describe 'Welcome screen', :js do ...@@ -12,7 +12,7 @@ RSpec.describe 'Welcome screen', :js do
before do before do
group.add_owner(user) group.add_owner(user)
gitlab_sign_in(user) gitlab_sign_in(user)
stub_request(:get, 'https://customers.gitlab.com/gitlab_plans?plan=free') stub_request(:get, "#{EE::SUBSCRIPTIONS_URL}/gitlab_plans?plan=free")
.to_return(status: 200, body: '{}', headers: {}) .to_return(status: 200, body: '{}', headers: {})
visit edit_subscriptions_group_path(group.path, params) visit edit_subscriptions_group_path(group.path, params)
......
...@@ -4,7 +4,7 @@ require 'spec_helper' ...@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe BillingPlansHelper do RSpec.describe BillingPlansHelper do
describe '#subscription_plan_data_attributes' do describe '#subscription_plan_data_attributes' do
let(:customer_portal_url) { "https://customers.gitlab.com/subscriptions" } let(:customer_portal_url) { "#{EE::SUBSCRIPTIONS_URL}/subscriptions" }
let(:group) { build(:group) } let(:group) { build(:group) }
let(:plan) do let(:plan) do
......
...@@ -4,7 +4,7 @@ require 'spec_helper' ...@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe FetchSubscriptionPlansService do RSpec.describe FetchSubscriptionPlansService do
describe '#execute' do describe '#execute' do
let(:endpoint_url) { 'https://customers.gitlab.com/gitlab_plans' } let(:endpoint_url) { "#{EE::SUBSCRIPTIONS_URL}/gitlab_plans" }
subject { described_class.new(plan: 'bronze').execute } subject { described_class.new(plan: 'bronze').execute }
......
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