diff options
author | Phil Hughes <me@iamphill.com> | 2016-10-03 09:10:20 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-10-03 09:10:20 +0100 |
commit | cc88fa4d5be9ec0d5fb42f1bb5efa0b82f30a589 (patch) | |
tree | 1b9facaf15466aa7f5b0393e97cb1eabfdcafa7e /spec/requests/api/users_spec.rb | |
parent | 69db604e55de2bdf1a28c274be6cc9131534517d (diff) | |
parent | f2c0f8237124d2dc539120bd77f301f216453cb7 (diff) | |
download | gitlab-ce-cc88fa4d5be9ec0d5fb42f1bb5efa0b82f30a589.tar.gz |
Merge branch 'master' into revert-c676283b
Diffstat (limited to 'spec/requests/api/users_spec.rb')
-rw-r--r-- | spec/requests/api/users_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index ef73778efa9..f4ea3bebb4c 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -62,6 +62,7 @@ describe API::API, api: true do expect(response).to have_http_status(200) expect(json_response).to be_an Array expect(json_response.first.keys).to include 'email' + expect(json_response.first.keys).to include 'organization' expect(json_response.first.keys).to include 'identities' expect(json_response.first.keys).to include 'can_create_project' expect(json_response.first.keys).to include 'two_factor_enabled' @@ -265,6 +266,14 @@ describe API::API, api: true do expect(user.reload.bio).to eq('new test bio') end + it "updates user with organization" do + put api("/users/#{user.id}", admin), { organization: 'GitLab' } + + expect(response).to have_http_status(200) + expect(json_response['organization']).to eq('GitLab') + expect(user.reload.organization).to eq('GitLab') + end + it 'updates user with his own email' do put api("/users/#{user.id}", admin), email: user.email expect(response).to have_http_status(200) |