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
4cd04443
Commit
4cd04443
authored
Apr 13, 2016
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix group_member_spec to not leak information
parent
ca40479c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
spec/requests/api/group_members_spec.rb
spec/requests/api/group_members_spec.rb
+7
-5
No files found.
spec/requests/api/group_members_spec.rb
View file @
4cd04443
...
...
@@ -42,9 +42,10 @@ describe API::API, api: true do
end
end
it
"users not part of the group should get access error"
do
it
'users not part of the group should get access error'
do
get
api
(
"/groups/
#{
group_with_members
.
id
}
/members"
,
stranger
)
expect
(
response
.
status
).
to
eq
(
403
)
expect
(
response
.
status
).
to
eq
(
404
)
end
end
end
...
...
@@ -165,12 +166,13 @@ describe API::API, api: true do
end
end
describe
"DELETE /groups/:id/members/:user_id"
do
context
"when not a member of the group"
do
describe
'DELETE /groups/:id/members/:user_id'
do
context
'when not a member of the group'
do
it
"should not delete guest's membership of group_with_members"
do
random_user
=
create
(
:user
)
delete
api
(
"/groups/
#{
group_with_members
.
id
}
/members/
#{
owner
.
id
}
"
,
random_user
)
expect
(
response
.
status
).
to
eq
(
403
)
expect
(
response
.
status
).
to
eq
(
404
)
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