API: extern_uid is a string
This commit is contained in:
parent
8dc2163ce5
commit
15932c360c
|
@ -16,7 +16,7 @@ module API
|
||||||
optional :website_url, type: String, desc: 'The website of the user'
|
optional :website_url, type: String, desc: 'The website of the user'
|
||||||
optional :organization, type: String, desc: 'The organization 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 :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 :provider, type: String, desc: 'The external provider'
|
||||||
optional :bio, type: String, desc: 'The biography of the user'
|
optional :bio, type: String, desc: 'The biography of the user'
|
||||||
optional :location, type: String, desc: 'The location of the user'
|
optional :location, type: String, desc: 'The location of the user'
|
||||||
|
|
|
@ -317,9 +317,9 @@ describe API::Users, api: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'updates user with new identity' do
|
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(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')
|
expect(user.reload.identities.first.provider).to eq('github')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue