Commit 5d0e5045 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch '219396-move-ldap-user-spec-ee' into 'master'

[RUN AS-IF-FOSS] Move ldap users spec to ee

Closes #219396

See merge request gitlab-org/gitlab!33341
parents 69c0980c 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)
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment