diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-03-28 18:53:52 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2018-03-28 18:53:52 +0200 |
commit | 59d910f2a136a52748326977fcefe2ec16c35d09 (patch) | |
tree | 7183ec4afac687b6aae7cadf2b614da8a72ba700 /spec | |
parent | f56ef2065710346f9998c87a136abc2fe3cbc454 (diff) | |
download | gitlab-ce-59d910f2a136a52748326977fcefe2ec16c35d09.tar.gz |
Set user when adding deploy key to project using API
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/deploy_keys_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/requests/api/deploy_keys_spec.rb b/spec/requests/api/deploy_keys_spec.rb index 0772b3f2e64..ae9c0e9c304 100644 --- a/spec/requests/api/deploy_keys_spec.rb +++ b/spec/requests/api/deploy_keys_spec.rb @@ -91,6 +91,10 @@ describe API::DeployKeys do expect do post api("/projects/#{project.id}/deploy_keys", admin), key_attrs end.to change { project.deploy_keys.count }.by(1) + + new_key = project.deploy_keys.last + expect(new_key.key).to eq(key_attrs[:key]) + expect(new_key.user).to eq(admin) end it 'returns an existing ssh key when attempting to add a duplicate' do |