diff options
author | Andrew Smith <espadav8@gmail.com> | 2016-11-30 22:26:22 +1000 |
---|---|---|
committer | Andrew Smith <espadav8@gmail.com> | 2016-12-01 22:13:42 +1000 |
commit | 532f8cbd38d61ba73886ea3ed0dbce1864819bec (patch) | |
tree | 1b99addfbfa9722ee3ea13b1543d1fffc97c9927 /spec | |
parent | 42dc2033dd4f04203c6f025ee96a058e050c9312 (diff) | |
download | gitlab-ce-532f8cbd38d61ba73886ea3ed0dbce1864819bec.tar.gz |
If SSH prototol is disabled don't say the user requires SSH keys
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/user_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 14c891994d0..475f4419d58 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -575,6 +575,18 @@ describe User, models: true do end end end + + context 'when current_application_settings.enabled_git_access_protocol does not contain SSH' do + before do + stub_application_setting(enabled_git_access_protocol: 'HTTP') + end + + it "doesn't require user to have SSH key" do + user = build(:user) + + expect(user.require_ssh_key?).to be_falsey + end + end end describe '.find_by_any_email' do |