diff options
author | Rémy Coutable <remy@rymai.me> | 2017-06-01 16:11:11 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-01 16:11:11 +0300 |
commit | f07aee72bef4604312e11a43fce3a47865bce100 (patch) | |
tree | a7adcdbe50246caf24dc27a16db397a7b8d34483 /spec/requests/api | |
parent | 483d88a9cdc8dc8f699b962c206eaa007aa370ef (diff) | |
parent | 00893f31b32bd5118e8d7eea3e0e90fe8fa90cb8 (diff) |
Merge branch 'bugfix/deploy_keys__can_push__usage_in_api' into 'master'
Add missing `can_push` parameter to POST /v3/deploy_keys
See merge request !11607
Diffstat (limited to 'spec/requests/api')
-rw-r--r-- | spec/requests/api/v3/deploy_keys_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/requests/api/v3/deploy_keys_spec.rb b/spec/requests/api/v3/deploy_keys_spec.rb index b61b2b618a6..94f4d93a8dc 100644 --- a/spec/requests/api/v3/deploy_keys_spec.rb +++ b/spec/requests/api/v3/deploy_keys_spec.rb @@ -105,6 +105,15 @@ describe API::V3::DeployKeys do expect(response).to have_http_status(201) end + + it 'accepts can_push parameter' do + key_attrs = attributes_for :write_access_key + + post v3_api("/projects/#{project.id}/#{path}", admin), key_attrs + + expect(response).to have_http_status(201) + expect(json_response['can_push']).to eq(true) + end end describe "DELETE /projects/:id/#{path}/:key_id" do |