Skip to content
Snippets Groups Projects
Commit b46c2c38 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets Committed by Wes Gurney
Browse files

Remove group api specs

parent d0762f87
No related branches found
No related tags found
1 merge request!4954Add support to configure webhook_timeout in gitlab.yaml
This commit is part of merge request !4954. Comments created here will be created in the context of that merge request.
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment