diff options
author | Nick Thomas <nick@gitlab.com> | 2018-11-12 13:52:48 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-11-19 14:46:39 +0300 |
commit | f1bc7b6eb5cb9beab55e4edac87cc5e0b7ceb069 (patch) | |
tree | 2e5aedd22e2fd05909c1e97c5bc52602feadc825 /spec/features/projects/settings | |
parent | b1b4c94484b0613a6a457e32218d4f62b9eb2029 (diff) |
SSH public-key authentication for push mirroring
Diffstat (limited to 'spec/features/projects/settings')
-rw-r--r-- | spec/features/projects/settings/repository_settings_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/features/projects/settings/repository_settings_spec.rb b/spec/features/projects/settings/repository_settings_spec.rb index 377a75cbcb3..401aac9478d 100644 --- a/spec/features/projects/settings/repository_settings_spec.rb +++ b/spec/features/projects/settings/repository_settings_spec.rb @@ -132,6 +132,27 @@ describe 'Projects > Settings > Repository settings' do it 'shows push mirror settings', :js do expect(page).to have_selector('#mirror_direction') end + + it 'generates an SSH public key on submission', :js do + fill_in 'url', with: 'ssh://user@localhost/project.git' + select 'SSH public key', from: 'Authentication method' + + direction_select = find('#mirror_direction') + + # In CE, this select box is disabled, but in EE, it is enabled + if direction_select.disabled? + expect(direction_select.value).to eq('push') + else + direction_select.select('Push') + end + + Sidekiq::Testing.fake! do + click_button 'Mirror repository' + end + + expect(page).to have_content('Mirroring settings were successfully updated') + expect(page).to have_selector('[title="Copy SSH public key"]') + end end end end |