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
b41a39bc
Commit
b41a39bc
authored
Mar 03, 2020
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor function inside it_behaves_like and add issue link in doc
parent
bd3388f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
doc/api/groups.md
doc/api/groups.md
+2
-2
spec/requests/api/groups_spec.rb
spec/requests/api/groups_spec.rb
+15
-13
No files found.
doc/api/groups.md
View file @
b41a39bc
...
@@ -492,7 +492,7 @@ Parameters:
...
@@ -492,7 +492,7 @@ Parameters:
|
`auto_devops_enabled`
| boolean | no | Default to Auto DevOps pipeline for all projects within this group. |
|
`auto_devops_enabled`
| boolean | no | Default to Auto DevOps pipeline for all projects within this group. |
|
`subgroup_creation_level`
| string | no | Allowed to create subgroups. Can be
`owner`
(Owners), or
`maintainer`
(Maintainers). |
|
`subgroup_creation_level`
| string | no | Allowed to create subgroups. Can be
`owner`
(Owners), or
`maintainer`
(Maintainers). |
|
`emails_disabled`
| boolean | no | Disable email notifications |
|
`emails_disabled`
| boolean | no | Disable email notifications |
|
`avatar`
| mixed | no | Image file for avatar of the group |
|
`avatar`
| mixed | no | Image file for avatar of the group
.
[
Introduced in GitLab 12.9
](
https://gitlab.com/gitlab-org/gitlab/issues/36681
)
|
|
`mentions_disabled`
| boolean | no | Disable the capability of a group from getting mentioned |
|
`mentions_disabled`
| boolean | no | Disable the capability of a group from getting mentioned |
|
`lfs_enabled`
| boolean | no | Enable/disable Large File Storage (LFS) for the projects in this group. |
|
`lfs_enabled`
| boolean | no | Enable/disable Large File Storage (LFS) for the projects in this group. |
|
`request_access_enabled`
| boolean | no | Allow users to request member access. |
|
`request_access_enabled`
| boolean | no | Allow users to request member access. |
...
@@ -554,7 +554,7 @@ PUT /groups/:id
...
@@ -554,7 +554,7 @@ PUT /groups/:id
|
`auto_devops_enabled`
| boolean | no | Default to Auto DevOps pipeline for all projects within this group. |
|
`auto_devops_enabled`
| boolean | no | Default to Auto DevOps pipeline for all projects within this group. |
|
`subgroup_creation_level`
| string | no | Allowed to create subgroups. Can be
`owner`
(Owners), or
`maintainer`
(Maintainers). |
|
`subgroup_creation_level`
| string | no | Allowed to create subgroups. Can be
`owner`
(Owners), or
`maintainer`
(Maintainers). |
|
`emails_disabled`
| boolean | no | Disable email notifications |
|
`emails_disabled`
| boolean | no | Disable email notifications |
|
`avatar`
| mixed | no | Image file for avatar of the group |
|
`avatar`
| mixed | no | Image file for avatar of the group
.
[
Introduced in GitLab 12.9
](
https://gitlab.com/gitlab-org/gitlab/issues/36681
)
|
|
`mentions_disabled`
| boolean | no | Disable the capability of a group from getting mentioned |
|
`mentions_disabled`
| boolean | no | Disable the capability of a group from getting mentioned |
|
`lfs_enabled`
(optional) | boolean | no | Enable/disable Large File Storage (LFS) for the projects in this group. |
|
`lfs_enabled`
(optional) | boolean | no | Enable/disable Large File Storage (LFS) for the projects in this group. |
|
`request_access_enabled`
| boolean | no | Allow users to request member access. |
|
`request_access_enabled`
| boolean | no | Allow users to request member access. |
...
...
spec/requests/api/groups_spec.rb
View file @
b41a39bc
...
@@ -580,15 +580,15 @@ describe API::Groups do
...
@@ -580,15 +580,15 @@ describe API::Groups do
describe
'PUT /groups/:id'
do
describe
'PUT /groups/:id'
do
let
(
:new_group_name
)
{
'New Group'
}
let
(
:new_group_name
)
{
'New Group'
}
def
make_upload_request
it_behaves_like
'group avatar upload'
do
group_param
=
{
def
make_upload_request
avatar:
fixture_file_upload
(
file_path
)
group_param
=
{
}
avatar:
fixture_file_upload
(
file_path
)
put
api
(
"/groups/
#{
group1
.
id
}
"
,
user1
),
params:
group_param
}
put
api
(
"/groups/
#{
group1
.
id
}
"
,
user1
),
params:
group_param
end
end
end
it_behaves_like
'group avatar upload'
context
'when authenticated as the group owner'
do
context
'when authenticated as the group owner'
do
it
'updates the group'
do
it
'updates the group'
do
put
api
(
"/groups/
#{
group1
.
id
}
"
,
user1
),
params:
{
put
api
(
"/groups/
#{
group1
.
id
}
"
,
user1
),
params:
{
...
@@ -990,13 +990,15 @@ describe API::Groups do
...
@@ -990,13 +990,15 @@ describe API::Groups do
end
end
describe
"POST /groups"
do
describe
"POST /groups"
do
def
make_upload_request
it_behaves_like
'group avatar upload'
do
group
=
attributes_for_group_api
request_access_enabled:
false
def
make_upload_request
group
[
:avatar
]
=
fixture_file_upload
(
file_path
)
params
=
attributes_for_group_api
(
request_access_enabled:
false
).
tap
do
|
attrs
|
post
api
(
"/groups"
,
user3
),
params:
group
attrs
[
:avatar
]
=
fixture_file_upload
(
file_path
)
end
end
it_behaves_like
'group avatar upload'
post
api
(
"/groups"
,
user3
),
params:
params
end
end
context
"when authenticated as user without group permissions"
do
context
"when authenticated as user without group permissions"
do
it
"does not create group"
do
it
"does not create group"
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