Commit 5a42b091 authored by Robert Speicher's avatar Robert Speicher

Merge branch '239338-experiment-cleanup-new-checkout-experience' into 'master'

Cleanup feature flag for new checkout experience

See merge request gitlab-org/gitlab!41644
parents 54a61279 ec3a16da
...@@ -22,8 +22,7 @@ module BillingPlansHelper ...@@ -22,8 +22,7 @@ module BillingPlansHelper
def use_new_purchase_flow?(namespace) def use_new_purchase_flow?(namespace)
namespace.group? && namespace.group? &&
namespace.actual_plan_name == Plan::FREE && namespace.actual_plan_name == Plan::FREE
Feature.enabled?(:free_group_new_purchase_flow, current_user)
end end
def show_contact_sales_button?(purchase_link_action) def show_contact_sales_button?(purchase_link_action)
......
---
title: New checkout flow for free groups on gitlab.com
merge_request: 41644
author:
type: added
...@@ -46,8 +46,7 @@ RSpec.describe BillingPlansHelper do ...@@ -46,8 +46,7 @@ RSpec.describe BillingPlansHelper do
end end
describe '#use_new_purchase_flow?' do describe '#use_new_purchase_flow?' do
where free_group_new_purchase: [true, false], where type: ['Group', nil],
type: ['Group', nil],
plan: Plan.all_plans plan: Plan.all_plans
with_them do with_them do
...@@ -59,13 +58,12 @@ RSpec.describe BillingPlansHelper do ...@@ -59,13 +58,12 @@ RSpec.describe BillingPlansHelper do
before do before do
allow(helper).to receive(:current_user).and_return(user) allow(helper).to receive(:current_user).and_return(user)
stub_feature_flags free_group_new_purchase_flow: free_group_new_purchase
end end
subject { helper.use_new_purchase_flow?(namespace) } subject { helper.use_new_purchase_flow?(namespace) }
it do it do
result = free_group_new_purchase && type == 'Group' && plan == Plan::FREE result = type == 'Group' && plan == Plan::FREE
is_expected.to be(result) is_expected.to be(result)
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