Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/requests/api/users_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index 45b7988a054..2c2e17eddb0 100644
--- a/spec/requests/api/users_spec.rb
+++ b/spec/requests/api/users_spec.rb
@@ -265,6 +265,14 @@ describe API::Users, api: true do
expect(response).to have_http_status(409)
expect(json_response['message']).to eq('Username has already been taken')
end
+
+ it 'creates user with new identity' do
+ post api("/users", admin), attributes_for(:user, provider: 'github', extern_uid: '67890')
+
+ expect(response).to have_http_status(201)
+ expect(json_response['identities'].first['extern_uid']).to eq('67890')
+ expect(json_response['identities'].first['provider']).to eq('github')
+ end
end
end