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
dcef2fc6
Commit
dcef2fc6
authored
May 28, 2020
by
Kyle Wiebers
Committed by
Peter Leitzen
May 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RUN AS-IF-FOSS] Move ldap users spec to ee
parent
06788a85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
ee/spec/requests/api/users_spec.rb
ee/spec/requests/api/users_spec.rb
+14
-0
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+0
-13
No files found.
ee/spec/requests/api/users_spec.rb
View file @
dcef2fc6
...
...
@@ -16,6 +16,20 @@ describe API::Users do
end
end
context
"when authenticated and ldap is enabled"
do
it
"returns non-ldap user"
do
ldap_user
=
create
:omniauth_user
,
provider:
"ldapserver1"
get
api
(
"/users"
,
user
),
params:
{
skip_ldap:
"true"
}
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
).
not_to
be_empty
expect
(
json_response
.
map
{
|
u
|
u
[
'username'
]
})
.
not_to
include
(
ldap_user
.
username
)
end
end
context
'when `disable_name_update_for_users` feature is available'
do
before
do
stub_licensed_features
(
disable_name_update_for_users:
true
)
...
...
spec/requests/api/users_spec.rb
View file @
dcef2fc6
...
...
@@ -465,19 +465,6 @@ describe API::Users, :do_not_mock_admin_mode do
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
end
end
context
"when authenticated and ldap is enabled"
do
it
"returns non-ldap user"
do
ldap_user
=
create
:omniauth_user
,
provider:
"ldapserver1"
get
api
(
"/users"
,
user
),
params:
{
skip_ldap:
"true"
}
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
.
map
{
|
u
|
u
[
'username'
]
})
.
not_to
include
(
ldap_user
.
username
)
end
end
end
describe
"GET /users/:id"
do
...
...
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