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
0b708e5d
Commit
0b708e5d
authored
Jun 28, 2019
by
Fabio Papa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style rules; Revert some examples
parent
6f3b2e07
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
spec/controllers/admin/groups_controller_spec.rb
spec/controllers/admin/groups_controller_spec.rb
+2
-4
spec/models/group_spec.rb
spec/models/group_spec.rb
+4
-2
spec/requests/api/groups_spec.rb
spec/requests/api/groups_spec.rb
+2
-2
spec/services/groups/create_service_spec.rb
spec/services/groups/create_service_spec.rb
+2
-2
No files found.
spec/controllers/admin/groups_controller_spec.rb
View file @
0b708e5d
...
...
@@ -70,13 +70,11 @@ describe Admin::GroupsController do
end
it
'updates the subgroup_creation_level successfully'
do
OWNER
=
::
Gitlab
::
Access
::
OWNER_SUBGROUP_ACCESS
expect
do
post
:update
,
params:
{
id:
group
.
to_param
,
group:
{
subgroup_creation_level:
OWNER
}
}
end
.
to
change
{
group
.
reload
.
subgroup_creation_level
}.
to
(
OWNER
)
group:
{
subgroup_creation_level:
::
Gitlab
::
Access
::
OWNER_SUBGROUP_ACCESS
}
}
end
.
to
change
{
group
.
reload
.
subgroup_creation_level
}.
to
(
::
Gitlab
::
Access
::
OWNER_SUBGROUP_ACCESS
)
end
end
end
spec/models/group_spec.rb
View file @
0b708e5d
...
...
@@ -996,9 +996,11 @@ describe Group do
end
describe
'subgroup_creation_level'
do
it
'defaults to maintainers'
do
it
'outputs the default one if it is nil'
do
group
=
create
(
:group
,
subgroup_creation_level:
nil
)
expect
(
group
.
subgroup_creation_level
)
.
to
eq
(
Gitlab
::
Access
::
MAINTAINER_SUBGROUP_ACCESS
)
.
to
eq
(
::
Gitlab
::
Access
::
MAINTAINER_SUBGROUP_ACCESS
)
end
end
end
spec/requests/api/groups_spec.rb
View file @
0b708e5d
...
...
@@ -803,10 +803,10 @@ describe API::Groups do
group2
.
add_maintainer
(
user1
)
end
it
'can create subgroups'
do
it
'can
not
create subgroups'
do
post
api
(
"/groups"
,
user1
),
params:
{
parent_id:
group2
.
id
,
name:
'foo'
,
path:
'foo'
}
expect
(
response
).
to
have_gitlab_http_status
(
201
)
expect
(
response
).
to
have_gitlab_http_status
(
403
)
end
end
end
...
...
spec/services/groups/create_service_spec.rb
View file @
0b708e5d
...
...
@@ -89,9 +89,9 @@ describe Groups::CreateService, '#execute' do
it
{
is_expected
.
to
be_persisted
}
end
context
'as
maintai
ner'
do
context
'as
Ow
ner'
do
before
do
group
.
add_
maintai
ner
(
user
)
group
.
add_
ow
ner
(
user
)
end
it
{
is_expected
.
to
be_persisted
}
...
...
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