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
0
Merge Requests
0
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
iv
gitlab-ce
Commits
f27830fa
Commit
f27830fa
authored
Sep 08, 2014
by
Jan-Willem van der Meer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure Gitlab::LDAP::authentication is tested
parent
f88b6d03
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
spec/lib/gitlab/auth_spec.rb
spec/lib/gitlab/auth_spec.rb
+17
-0
No files found.
spec/lib/gitlab/auth_spec.rb
View file @
f27830fa
...
@@ -26,5 +26,22 @@ describe Gitlab::Auth do
...
@@ -26,5 +26,22 @@ describe Gitlab::Auth do
user
=
'wrong'
user
=
'wrong'
expect
(
gl_auth
.
find
(
username
,
password
)
).
to_not
eql
user
expect
(
gl_auth
.
find
(
username
,
password
)
).
to_not
eql
user
end
end
context
"with ldap enabled"
do
before
{
Gitlab
.
config
.
ldap
[
'enabled'
]
=
true
}
after
{
Gitlab
.
config
.
ldap
[
'enabled'
]
=
false
}
it
"tries to autheticate with db before ldap"
do
expect
(
Gitlab
::
LDAP
::
User
).
not_to
receive
(
:authenticate
)
gl_auth
.
find
(
username
,
password
)
end
it
"uses ldap as fallback to for authentication"
do
expect
(
Gitlab
::
LDAP
::
User
).
to
receive
(
:authenticate
)
gl_auth
.
find
(
'ldap_user'
,
'password'
)
end
end
end
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