Commit 1857298c authored by James Fargher's avatar James Fargher

Merge branch 'include-default-plan-in-plans-eligible-for-trial' into 'master'

Include default plan as being eligible for a trial

See merge request gitlab-org/gitlab!39659
parents 7bca2d93 d5c39ad5
......@@ -16,7 +16,7 @@ module EE
PAID_HOSTED_PLANS = [BRONZE, SILVER, GOLD].freeze
FREE_HOSTED_PLANS = [EARLY_ADOPTER].freeze
EE_ALL_PLANS = (EE_DEFAULT_PLANS + PAID_HOSTED_PLANS + FREE_HOSTED_PLANS).freeze
PLANS_ELIGIBLE_FOR_TRIAL = [FREE, *FREE_HOSTED_PLANS].freeze
PLANS_ELIGIBLE_FOR_TRIAL = [*EE_DEFAULT_PLANS, *FREE_HOSTED_PLANS].freeze
# This constant must keep ordered by tier.
ALL_HOSTED_PLANS = (PAID_HOSTED_PLANS + FREE_HOSTED_PLANS).freeze
......
......@@ -24,6 +24,10 @@ FactoryBot.define do
trial_ends_on { Date.today.advance(days: -1) }
end
trait :default do
association :hosted_plan, factory: :default_plan
end
trait :free do
hosted_plan_id { nil }
end
......
......@@ -22,4 +22,10 @@ RSpec.describe Plan do
end
end
end
describe '::PLANS_ELIGIBLE_FOR_TRIAL' do
subject { ::Plan::PLANS_ELIGIBLE_FOR_TRIAL }
it { is_expected.to eq(%w[default free early_adopter]) }
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