summaryrefslogtreecommitdiff
path: root/spec/features/projects/settings/repository_settings_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/settings/repository_settings_spec.rb')
-rw-r--r--spec/features/projects/settings/repository_settings_spec.rb21
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