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:
authorRémy Coutable <remy@rymai.me>2017-01-04 19:29:55 +0300
committerRémy Coutable <remy@rymai.me>2017-01-04 19:29:55 +0300
commit042bcdd555acda83ed1d49e941334fdac8c285a8 (patch)
tree14aa978955347644225b36455617a103e80cf1fe /spec/requests
parentec4fe4432a2c4daa14c8e8f7c5d8567553062ebf (diff)
Add a failing spec to the POST /users API
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/requests')
-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