Extend spec tests for deploy_key can_push

Copied from the v4 tests: https://gitlab.com/gitlab-org/gitlab-ce/blob/v9.2.0/spec/requests/api/deploy_keys_spec.rb#L110-116
This commit is contained in:
Richard Clamp 2017-05-22 20:46:58 +01:00
parent 5f7ed486dc
commit 00893f31b3
1 changed files with 9 additions and 0 deletions

View File

@ -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