diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2018-03-01 18:14:53 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2018-03-01 18:14:53 +0000 |
commit | 119cdf3b3b56aa3c237b070ffde856f09992a8a1 (patch) | |
tree | 02e6cd5efb2a7f2f2247da0ca811ef70c54f40a9 /spec/support/ldap_helpers.rb | |
parent | 56e106d47f76c8692bfc2acdd018f5b2d11afd95 (diff) | |
parent | bb41a889487463f626796a390148ae7870c16824 (diff) | |
download | gitlab-ce-webpack-registry.tar.gz |
Merge branch 'master' into 'webpack-registry'webpack-registry
# Conflicts:
# config/webpack.config.js
Diffstat (limited to 'spec/support/ldap_helpers.rb')
-rw-r--r-- | spec/support/ldap_helpers.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/support/ldap_helpers.rb b/spec/support/ldap_helpers.rb index 28d39a32f02..081ce0ad7b7 100644 --- a/spec/support/ldap_helpers.rb +++ b/spec/support/ldap_helpers.rb @@ -1,13 +1,13 @@ module LdapHelpers def ldap_adapter(provider = 'ldapmain', ldap = double(:ldap)) - ::Gitlab::LDAP::Adapter.new(provider, ldap) + ::Gitlab::Auth::LDAP::Adapter.new(provider, ldap) end def user_dn(uid) "uid=#{uid},ou=users,dc=example,dc=com" end - # Accepts a hash of Gitlab::LDAP::Config keys and values. + # Accepts a hash of Gitlab::Auth::LDAP::Config keys and values. # # Example: # stub_ldap_config( @@ -15,21 +15,21 @@ module LdapHelpers # admin_group: 'my-admin-group' # ) def stub_ldap_config(messages) - allow_any_instance_of(::Gitlab::LDAP::Config).to receive_messages(messages) + allow_any_instance_of(::Gitlab::Auth::LDAP::Config).to receive_messages(messages) end # Stub an LDAP person search and provide the return entry. Specify `nil` for # `entry` to simulate when an LDAP person is not found # # Example: - # adapter = ::Gitlab::LDAP::Adapter.new('ldapmain', double(:ldap)) + # adapter = ::Gitlab::Auth::LDAP::Adapter.new('ldapmain', double(:ldap)) # ldap_user_entry = ldap_user_entry('john_doe') # # stub_ldap_person_find_by_uid('john_doe', ldap_user_entry, adapter) def stub_ldap_person_find_by_uid(uid, entry, provider = 'ldapmain') - return_value = ::Gitlab::LDAP::Person.new(entry, provider) if entry.present? + return_value = ::Gitlab::Auth::LDAP::Person.new(entry, provider) if entry.present? - allow(::Gitlab::LDAP::Person) + allow(::Gitlab::Auth::LDAP::Person) .to receive(:find_by_uid).with(uid, any_args).and_return(return_value) end |