Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d2755c32
Commit
d2755c32
authored
Sep 24, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add initial user filter spec
parent
cf0d71e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
spec/ee/spec/lib/ee/gitlab/ldap/user_filter_spec.rb
spec/ee/spec/lib/ee/gitlab/ldap/user_filter_spec.rb
+28
-0
No files found.
spec/ee/spec/lib/ee/gitlab/ldap/user_filter_spec.rb
0 → 100644
View file @
d2755c32
require
'spec_helper'
describe
EE
::
Gitlab
::
LDAP
::
UserFilter
do
include
LdapHelpers
let
(
:auth_hash
)
do
OmniAuth
::
AuthHash
.
new
(
uid:
'uid=john,ou=people,dc=example,dc=com'
,
provider:
'ldapmain'
)
end
let!
(
:fake_proxy
)
{
fake_ldap_sync_proxy
(
auth_hash
.
provider
)
}
before
do
stub_ldap_config
(
base:
'dc=example,dc=com'
,
active_directory:
false
)
end
describe
'#filter'
do
it
'returns dns from an LDAP search'
do
filter
=
'(ou=people)'
entry
=
ldap_group_entry
(
%w(john mary)
)
allow
(
fake_proxy
.
adapter
).
to
receive
(
:ldap_search
).
and_return
([
entry
])
expect
(
described_class
.
filter
(
fake_proxy
,
filter
)).
to
eq
(
''
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment