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
85adbf85
Commit
85adbf85
authored
Feb 07, 2020
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add trial field to namespaces API
parent
4c94998b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
ee/changelogs/unreleased/aa-add-trial-field-to-namespaces-api.yml
...elogs/unreleased/aa-add-trial-field-to-namespaces-api.yml
+5
-0
ee/lib/ee/api/entities.rb
ee/lib/ee/api/entities.rb
+3
-0
ee/spec/requests/api/namespaces_spec.rb
ee/spec/requests/api/namespaces_spec.rb
+3
-3
No files found.
ee/changelogs/unreleased/aa-add-trial-field-to-namespaces-api.yml
0 → 100644
View file @
85adbf85
---
title
:
Add trial field to namespaces API
merge_request
:
24666
author
:
type
:
added
ee/lib/ee/api/entities.rb
View file @
85adbf85
...
...
@@ -170,6 +170,9 @@ module EE
expose
:trial_ends_on
,
if:
can_admin_namespace
do
|
namespace
,
_
|
namespace
.
trial_ends_on
end
expose
:trial
,
if:
can_admin_namespace
do
|
namespace
,
_
|
namespace
.
trial?
end
end
end
...
...
ee/spec/requests/api/namespaces_spec.rb
View file @
85adbf85
...
...
@@ -22,12 +22,12 @@ describe API::Namespaces do
expect
(
group_kind_json_response
.
keys
).
to
contain_exactly
(
'id'
,
'kind'
,
'name'
,
'path'
,
'full_path'
,
'parent_id'
,
'members_count_with_descendants'
,
'plan'
,
'shared_runners_minutes_limit'
,
'avatar_url'
,
'web_url'
,
'trial_ends_on'
,
'avatar_url'
,
'web_url'
,
'trial_ends_on'
,
'trial'
,
'extra_shared_runners_minutes_limit'
,
'billable_members_count'
)
expect
(
user_kind_json_response
.
keys
).
to
contain_exactly
(
'id'
,
'kind'
,
'name'
,
'path'
,
'full_path'
,
'parent_id'
,
'plan'
,
'shared_runners_minutes_limit'
,
'avatar_url'
,
'web_url'
,
'trial_ends_on'
,
'avatar_url'
,
'web_url'
,
'trial_ends_on'
,
'trial'
,
'extra_shared_runners_minutes_limit'
,
'billable_members_count'
)
end
end
...
...
@@ -41,7 +41,7 @@ describe API::Namespaces do
owned_group_response
=
json_response
.
find
{
|
resource
|
resource
[
'id'
]
==
group1
.
id
}
expect
(
owned_group_response
.
keys
).
to
contain_exactly
(
'id'
,
'kind'
,
'name'
,
'path'
,
'full_path'
,
'trial_ends_on'
,
'plan'
,
'parent_id'
,
'members_count_with_descendants'
,
'plan'
,
'parent_id'
,
'members_count_with_descendants'
,
'trial'
,
'avatar_url'
,
'web_url'
,
'billable_members_count'
)
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