Merge branch 'master' into fixes/api, code clean up and tests fixed

Conflicts:
	doc/api/projects.md
	spec/requests/api/projects_spec.rb
This commit is contained in:
Sebastian Ziebell 2013-03-07 14:51:56 +01:00
commit 3374027e3a
49 changed files with 820 additions and 163 deletions

View file

@ -167,6 +167,22 @@ describe Gitlab::API do
end
end
describe "POST /users/:id/keys" do
before { admin }
it "should not create invalid ssh key" do
post api("/users/#{user.id}/keys", admin), { title: "invalid key" }
response.status.should == 404
end
it "should create ssh key" do
key_attrs = attributes_for :key
expect {
post api("/users/#{user.id}/keys", admin), key_attrs
}.to change{ user.keys.count }.by(1)
end
end
describe "DELETE /users/:id" do
before { admin }