diff options
author | Stan Hu <stanhu@gmail.com> | 2019-07-16 22:13:26 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-07-16 22:13:26 +0000 |
commit | f0400dc7c01ab53cdc286d639b50e1ce98a9beaf (patch) | |
tree | 3c24f4e4e773ccda631db07bbbbc817ff72e5ecc /spec/requests | |
parent | e26d99329699ca550a2f1c21bbb1f4c481425085 (diff) | |
parent | ce40c12849c8977e285962f8752cd78ac64c92ea (diff) | |
download | gitlab-ce-f0400dc7c01ab53cdc286d639b50e1ce98a9beaf.tar.gz |
Merge branch '12800-read-and-write-user-admin-notes-via-api-ce' into 'master'
CE Backport: Read and write User "Admin notes" via API
See merge request gitlab-org/gitlab-ce!30775
Diffstat (limited to 'spec/requests')
-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 0ad50e5347a..af2bee4563a 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -448,6 +448,7 @@ describe API::Users do it "returns 201 Created on success" do post api("/users", admin), params: attributes_for(:user, projects_limit: 3) + expect(response).to match_response_schema('public_api/v4/user/admin') expect(response).to have_gitlab_http_status(201) end @@ -643,6 +644,13 @@ describe API::Users do describe "PUT /users/:id" do let!(:admin_user) { create(:admin) } + it "returns 200 OK on success" do + put api("/users/#{user.id}", admin), params: { bio: 'new test bio' } + + expect(response).to match_response_schema('public_api/v4/user/admin') + expect(response).to have_gitlab_http_status(200) + end + it "updates user with new bio" do put api("/users/#{user.id}", admin), params: { bio: 'new test bio' } |