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
f019821d
Commit
f019821d
authored
Sep 03, 2014
by
Jan-Willem van der Meer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In between patches fixup
parent
9d3eb091
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
13 deletions
+1
-13
spec/lib/gitlab/ldap/user_spec.rb
spec/lib/gitlab/ldap/user_spec.rb
+1
-13
No files found.
spec/lib/gitlab/ldap/user_spec.rb
View file @
f019821d
...
...
@@ -31,18 +31,6 @@ describe Gitlab::LDAP::User do
gl_auth
.
find_or_create
(
@auth
)
end
it
"should update credentials by username if missing uid and Gitlab.config.ldap.allow_username_or_email_login is true"
do
user
=
double
(
'User'
)
value
=
Gitlab
.
config
.
ldap
.
allow_username_or_email_login
Gitlab
.
config
.
ldap
[
'allow_username_or_email_login'
]
=
true
User
.
stub
find_by_extern_uid_and_provider:
nil
User
.
stub
(
:find_by
).
with
(
hash_including
(
email:
anything
()))
{
nil
}
User
.
stub
(
:find_by
).
with
(
hash_including
(
username:
anything
()))
{
user
}
user
.
should_receive
:update_attributes
gl_auth
.
find_or_create
(
@auth
)
Gitlab
.
config
.
ldap
[
'allow_username_or_email_login'
]
=
value
end
it
"should not update credentials by username if missing uid and Gitlab.config.ldap.allow_username_or_email_login is false"
do
user
=
double
(
'User'
)
value
=
Gitlab
.
config
.
ldap
.
allow_username_or_email_login
...
...
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