diff options
author | Alexander Randa <randa.alex@gmail.com> | 2017-06-20 09:37:07 +0000 |
---|---|---|
committer | Alexander Randa <randa.alex@gmail.com> | 2017-06-20 11:23:13 +0000 |
commit | c7bcebd56e264772a8fe177e64476ea7b2b80144 (patch) | |
tree | dc224aa7476c7e8f87df51bb63965d2e9033db4f /spec/features/projects/settings/repository_settings_spec.rb | |
parent | 5214e507b043c8e71d2826252491cdac97d27416 (diff) | |
download | gitlab-ce-c7bcebd56e264772a8fe177e64476ea7b2b80144.tar.gz |
Fix edit button for deploy keys available from other projects
Diffstat (limited to 'spec/features/projects/settings/repository_settings_spec.rb')
-rw-r--r-- | spec/features/projects/settings/repository_settings_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/projects/settings/repository_settings_spec.rb b/spec/features/projects/settings/repository_settings_spec.rb index 2956ef73746..35cd0d6e832 100644 --- a/spec/features/projects/settings/repository_settings_spec.rb +++ b/spec/features/projects/settings/repository_settings_spec.rb @@ -65,6 +65,23 @@ feature 'Repository settings', feature: true do expect(page).to have_content('Write access allowed') end + scenario 'edit a deploy key from projects user has access to' do + project2 = create(:project_empty_repo) + project2.team << [user, role] + project2.deploy_keys << private_deploy_key + + visit namespace_project_settings_repository_path(project.namespace, project) + + find('li', text: private_deploy_key.title).click_link('Edit') + + fill_in 'deploy_key_title', with: 'updated_deploy_key' + check 'deploy_key_can_push' + click_button 'Save changes' + + expect(page).to have_content('updated_deploy_key') + expect(page).to have_content('Write access allowed') + end + scenario 'remove an existing deploy key' do project.deploy_keys << private_deploy_key visit namespace_project_settings_repository_path(project.namespace, project) |