API: groups documentation updated, functions return different status codes

Updates the API documentation of groups with infos to return codes. The function calls
in the groups API have updated documentation and return `400 Bad Request` status code
if a required attribute is missing.
This commit is contained in:
Sebastian Ziebell 2013-02-27 12:34:45 +01:00
parent e119b0a0cb
commit 873db06255
3 changed files with 44 additions and 7 deletions

View file

@ -88,6 +88,16 @@ describe Gitlab::API do
post api("/groups", admin), {:name => "Duplicate Test", :path => group2.path}
response.status.should == 404
end
it "should return 400 bad request error if name not given" do
post api("/groups", admin), { :path => group2.path }
response.status.should == 400
end
it "should return 400 bad request error if path not given" do
post api("/groups", admin), { :name => 'test' }
response.status.should == 400
end
end
end
end