diff options
author | Rémy Coutable <remy@rymai.me> | 2017-04-06 10:11:31 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-04-06 10:11:31 +0000 |
commit | d7e3f2322fd0ad632687f2f27a1cf2aac5474ac9 (patch) | |
tree | 43be97aec914f2331f262f4de9c542fd93c84406 /spec/requests | |
parent | 38c90cdcacaa9a75944aced2eede8fe9c7224040 (diff) | |
parent | 4865a7ab92bd74f6376d50be4dd3b2e3937c5841 (diff) | |
download | gitlab-ce-d7e3f2322fd0ad632687f2f27a1cf2aac5474ac9.tar.gz |
Merge branch '30021-api-deploy_keys-can_push-is-not-honoured' into 'master'
Enable creation of deploy keys with write access via the API
Closes #30021
See merge request !10488
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/deploy_keys_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/requests/api/deploy_keys_spec.rb b/spec/requests/api/deploy_keys_spec.rb index 4f4b18cf0e0..e1beac28dab 100644 --- a/spec/requests/api/deploy_keys_spec.rb +++ b/spec/requests/api/deploy_keys_spec.rb @@ -108,6 +108,15 @@ describe API::DeployKeys, api: true do expect(response).to have_http_status(201) end + + it 'accepts can_push parameter' do + key_attrs = attributes_for :write_access_key + + post api("/projects/#{project.id}/deploy_keys", admin), key_attrs + + expect(response).to have_http_status(201) + expect(json_response['can_push']).to eq(true) + end end describe 'DELETE /projects/:id/deploy_keys/:key_id' do |