Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d5c39ad5
Commit
d5c39ad5
authored
Aug 17, 2020
by
Dallas Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include default plan as being eligible for a trial
parent
6e40f5d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
ee/app/models/ee/plan.rb
ee/app/models/ee/plan.rb
+1
-1
ee/spec/factories/gitlab_subscriptions.rb
ee/spec/factories/gitlab_subscriptions.rb
+4
-0
ee/spec/models/plan_spec.rb
ee/spec/models/plan_spec.rb
+6
-0
No files found.
ee/app/models/ee/plan.rb
View file @
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
...
...
ee/spec/factories/gitlab_subscriptions.rb
View file @
d5c39ad5
...
...
@@ -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
...
...
ee/spec/models/plan_spec.rb
View file @
d5c39ad5
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment