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:
commit
3374027e3a
49 changed files with 820 additions and 163 deletions
|
@ -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 }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue