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
788999a4
Commit
788999a4
authored
May 29, 2017
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Multiple Issue Assignees feature to License model
parent
691b0e8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
app/models/license.rb
app/models/license.rb
+4
-0
spec/models/license_spec.rb
spec/models/license_spec.rb
+12
-2
No files found.
app/models/license.rb
View file @
788999a4
...
...
@@ -18,6 +18,7 @@ class License < ActiveRecord::Base
MERGE_REQUEST_APPROVERS_FEATURE
=
'GitLab_MergeRequestApprovers'
.
freeze
MERGE_REQUEST_REBASE_FEATURE
=
'GitLab_MergeRequestRebase'
.
freeze
MERGE_REQUEST_SQUASH_FEATURE
=
'GitLab_MergeRequestSquash'
.
freeze
MULTIPLE_ISSUE_ASSIGNEES_FEATURE
=
'GitLab_MultipleIssueAssignees'
.
freeze
OBJECT_STORAGE_FEATURE
=
'GitLab_ObjectStorage'
.
freeze
PUSH_RULES_FEATURE
=
'GitLab_PushRules'
.
freeze
RELATED_ISSUES_FEATURE
=
'RelatedIssues'
.
freeze
...
...
@@ -48,6 +49,7 @@ class License < ActiveRecord::Base
merge_request_approvers:
MERGE_REQUEST_APPROVERS_FEATURE
,
merge_request_rebase:
MERGE_REQUEST_REBASE_FEATURE
,
merge_request_squash:
MERGE_REQUEST_SQUASH_FEATURE
,
multiple_issue_assignees:
MULTIPLE_ISSUE_ASSIGNEES_FEATURE
,
push_rules:
PUSH_RULES_FEATURE
}.
freeze
...
...
@@ -70,6 +72,7 @@ class License < ActiveRecord::Base
{
MERGE_REQUEST_APPROVERS_FEATURE
=>
1
},
{
MERGE_REQUEST_REBASE_FEATURE
=>
1
},
{
MERGE_REQUEST_SQUASH_FEATURE
=>
1
},
{
MULTIPLE_ISSUE_ASSIGNEES_FEATURE
=>
1
},
{
PUSH_RULES_FEATURE
=>
1
},
{
RELATED_ISSUES_FEATURE
=>
1
}
].
freeze
...
...
@@ -113,6 +116,7 @@ class License < ActiveRecord::Base
{
MERGE_REQUEST_APPROVERS_FEATURE
=>
1
},
{
MERGE_REQUEST_REBASE_FEATURE
=>
1
},
{
MERGE_REQUEST_SQUASH_FEATURE
=>
1
},
{
MULTIPLE_ISSUE_ASSIGNEES_FEATURE
=>
1
},
{
OBJECT_STORAGE_FEATURE
=>
1
},
{
PUSH_RULES_FEATURE
=>
1
},
{
SERVICE_DESK_FEATURE
=>
1
}
...
...
spec/models/license_spec.rb
View file @
788999a4
...
...
@@ -212,9 +212,19 @@ describe License do
end
describe
'.features_for_plan'
do
it
'returns features for given plan'
do
it
'returns features for starter plan'
do
expect
(
described_class
.
features_for_plan
(
'starter'
))
.
to
include
({
'GitLab_MultipleIssueAssignees'
=>
1
})
end
it
'returns features for premium plan'
do
expect
(
described_class
.
features_for_plan
(
'premium'
))
.
to
include
({
'GitLab_MultipleIssueAssignees'
=>
1
,
'GitLab_DeployBoard'
=>
1
,
'GitLab_FileLocks'
=>
1
})
end
it
'returns features for early adopter plan'
do
expect
(
described_class
.
features_for_plan
(
'premium'
))
.
to
include
({
'GitLab_DeployBoard'
=>
1
,
'GitLab_FileLocks'
=>
1
})
.
to
include
({
'GitLab_DeployBoard'
=>
1
,
'GitLab_FileLocks'
=>
1
}
)
end
it
'returns empty Hash if no features for given plan'
do
...
...
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