diff options
author | Imre Farkas <ifarkas@gitlab.com> | 2018-11-13 00:40:42 +0300 |
---|---|---|
committer | Imre Farkas <ifarkas@gitlab.com> | 2018-11-18 23:00:28 +0300 |
commit | 02326fa4b128c6272cc5c802cf5145f0fa6f6cc2 (patch) | |
tree | a17739647988e8f2c3e414cb9c91d76c09496f6a /spec/helpers/auth_helper_spec.rb | |
parent | 29d8179ba07be3ed111f939285eb4064d84cb7df (diff) |
Backport of ee/8120: Smartcard authentication
Diffstat (limited to 'spec/helpers/auth_helper_spec.rb')
-rw-r--r-- | spec/helpers/auth_helper_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/helpers/auth_helper_spec.rb b/spec/helpers/auth_helper_spec.rb index 120b23e66ac..f0c2e4768ec 100644 --- a/spec/helpers/auth_helper_spec.rb +++ b/spec/helpers/auth_helper_spec.rb @@ -42,6 +42,16 @@ describe AuthHelper do end end + describe 'form_based_auth_provider_has_active_class?' do + it 'selects main LDAP server' do + allow(helper).to receive(:auth_providers) { [:twitter, :ldapprimary, :ldapsecondary, :kerberos] } + expect(helper.form_based_auth_provider_has_active_class?(:twitter)).to be(false) + expect(helper.form_based_auth_provider_has_active_class?(:ldapprimary)).to be(true) + expect(helper.form_based_auth_provider_has_active_class?(:ldapsecondary)).to be(false) + expect(helper.form_based_auth_provider_has_active_class?(:kerberos)).to be(false) + end + end + describe 'enabled_button_based_providers' do before do allow(helper).to receive(:auth_providers) { [:twitter, :github] } |