diff options
author | Rémy Coutable <remy@rymai.me> | 2017-01-04 19:29:55 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-01-04 19:29:55 +0300 |
commit | 042bcdd555acda83ed1d49e941334fdac8c285a8 (patch) | |
tree | 14aa978955347644225b36455617a103e80cf1fe /spec | |
parent | ec4fe4432a2c4daa14c8e8f7c5d8567553062ebf (diff) |
Add a failing spec to the POST /users API
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/users_spec.rb | 8 |
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 |