diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2014-09-30 12:07:31 +0200 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2014-09-30 12:07:31 +0200 |
commit | f7aba277e7971668172196da74f946e5a48aabc3 (patch) | |
tree | 85e122e4e562360b759c21f006a060e21d350f0f /spec | |
parent | 0c29cb3451414d21346894c140a17c53de6e1567 (diff) | |
download | gitlab-ce-f7aba277e7971668172196da74f946e5a48aabc3.tar.gz |
Add option to gitlab config to specify if LDAP server is active directory.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/ldap/access_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ldap/access_spec.rb b/spec/lib/gitlab/ldap/access_spec.rb index 2307a03f656..d50f605e050 100644 --- a/spec/lib/gitlab/ldap/access_spec.rb +++ b/spec/lib/gitlab/ldap/access_spec.rb @@ -27,6 +27,21 @@ describe Gitlab::LDAP::Access do it { should be_true } end + + context 'and has no disabled flag in active diretory' do + before { + Gitlab::LDAP::Person.stub(disabled_via_active_directory?: false) + Gitlab.config.ldap['enabled'] = true + Gitlab.config.ldap['active_directory'] = false + } + + after { + Gitlab.config.ldap['enabled'] = false + Gitlab.config.ldap['active_directory'] = true + } + + it { should be_false } + end end end end |