diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-01-03 11:09:54 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-01-05 15:36:25 -0200 |
commit | 09261a780ec9cf5dfacdac55458eb8a1551b160c (patch) | |
tree | a5bac80c1634ac7f26e44902167d01b6268f8ef5 | |
parent | 30522bf491fde73b42fdb1958b80477cef492b05 (diff) | |
download | gitlab-ce-09261a780ec9cf5dfacdac55458eb8a1551b160c.tar.gz |
Merge branch 'api-fix-extern-uid-validation' into 'master'
API: extern_uid is a string
Closes #26227
See merge request !8404
-rw-r--r-- | lib/api/users.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/users_spec.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 0842c3874c5..192dc0a0827 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -16,7 +16,7 @@ module API optional :website_url, type: String, desc: 'The website of the user' optional :organization, type: String, desc: 'The organization of the user' optional :projects_limit, type: Integer, desc: 'The number of projects a user can create' - optional :extern_uid, type: Integer, desc: 'The external authentication provider UID' + optional :extern_uid, type: String, desc: 'The external authentication provider UID' optional :provider, type: String, desc: 'The external provider' optional :bio, type: String, desc: 'The biography of the user' optional :location, type: String, desc: 'The location of the user' diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index 9e317f3a7e9..45b7988a054 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -317,9 +317,9 @@ describe API::Users, api: true do end it 'updates user with new identity' do - put api("/users/#{user.id}", admin), provider: 'github', extern_uid: '67890' + put api("/users/#{user.id}", admin), provider: 'github', extern_uid: 'john' expect(response).to have_http_status(200) - expect(user.reload.identities.first.extern_uid).to eq('67890') + expect(user.reload.identities.first.extern_uid).to eq('john') expect(user.reload.identities.first.provider).to eq('github') end |