Commit dcef2fc6 authored by Kyle Wiebers's avatar Kyle Wiebers Committed by Peter Leitzen

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

parent 06788a85
...@@ -16,6 +16,20 @@ describe API::Users do ...@@ -16,6 +16,20 @@ describe API::Users do
end end
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 context 'when `disable_name_update_for_users` feature is available' do
before do before do
stub_licensed_features(disable_name_update_for_users: true) stub_licensed_features(disable_name_update_for_users: true)
......
...@@ -465,19 +465,6 @@ describe API::Users, :do_not_mock_admin_mode do ...@@ -465,19 +465,6 @@ describe API::Users, :do_not_mock_admin_mode do
expect(response).to have_gitlab_http_status(:bad_request) expect(response).to have_gitlab_http_status(:bad_request)
end end
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 end
describe "GET /users/:id" do 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