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
1a18e778
Commit
1a18e778
authored
Oct 07, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove group api specs
parent
f141711c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
spec/requests/api/groups_spec.rb
spec/requests/api/groups_spec.rb
+38
-0
No files found.
spec/requests/api/groups_spec.rb
View file @
1a18e778
...
...
@@ -106,6 +106,44 @@ describe API::API do
end
end
describe
"DELETE /groups/:id"
do
context
"when authenticated as user"
do
it
"should remove group"
do
delete
api
(
"/groups/
#{
group1
.
id
}
"
,
user1
)
response
.
status
.
should
==
200
end
it
"should not remove a group if not an owner"
do
user3
=
create
(
:user
)
group1
.
add_user
(
user3
,
Gitlab
::
Access
::
MASTER
)
delete
api
(
"/groups/
#{
group1
.
id
}
"
,
user3
)
response
.
status
.
should
==
403
end
it
"should not remove a non existing group"
do
delete
api
(
"/groups/1328"
,
user1
)
response
.
status
.
should
==
404
end
it
"should not remove a group not attached to user1"
do
delete
api
(
"/groups/
#{
group2
.
id
}
"
,
user1
)
response
.
status
.
should
==
403
end
end
context
"when authenticated as admin"
do
it
"should remove any existing group"
do
delete
api
(
"/groups/
#{
group2
.
id
}
"
,
admin
)
response
.
status
.
should
==
200
end
it
"should not remove a non existing group"
do
delete
api
(
"/groups/1328"
,
admin
)
response
.
status
.
should
==
404
end
end
end
describe
"POST /groups/:id/projects/:project_id"
do
let
(
:project
)
{
create
(
:project
)
}
before
(
:each
)
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