diff options
author | Jan-Willem van der Meer <mail@jewilmeer.nl> | 2014-10-13 19:33:44 +0400 |
---|---|---|
committer | Jan-Willem van der Meer <mail@jewilmeer.nl> | 2014-10-13 19:33:44 +0400 |
commit | 5e1c39cb783843163edf47718fa6d39b4ebb52e1 (patch) | |
tree | a5364bbfff4da579cdfef67c570e0164270d5f21 /spec/lib/gitlab/auth_spec.rb | |
parent | 01b791237cf6a1b7deaee3da3df6541e0b5107d1 (diff) |
Merge tests to support Multiple LDAP groups
Diffstat (limited to 'spec/lib/gitlab/auth_spec.rb')
-rw-r--r-- | spec/lib/gitlab/auth_spec.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb index 551fb3fb5f6..1f3e1a4a3c1 100644 --- a/spec/lib/gitlab/auth_spec.rb +++ b/spec/lib/gitlab/auth_spec.rb @@ -28,17 +28,16 @@ describe Gitlab::Auth do end context "with ldap enabled" do - before { Gitlab.config.ldap['enabled'] = true } - after { Gitlab.config.ldap['enabled'] = false } + before { Gitlab::LDAP::Config.stub(enabled?: true) } it "tries to autheticate with db before ldap" do - expect(Gitlab::LDAP::User).not_to receive(:authenticate) + expect(Gitlab::LDAP::Authentication).not_to receive(:login) gl_auth.find(username, password) end it "uses ldap as fallback to for authentication" do - expect(Gitlab::LDAP::User).to receive(:authenticate) + expect(Gitlab::LDAP::Authentication).to receive(:login) gl_auth.find('ldap_user', 'password') end |