summaryrefslogtreecommitdiff
path: root/spec/requests/api/users_spec.rb
diff options
context:
space:
mode:
authormanojmj <mmj@gitlab.com>2019-07-16 14:52:40 +0530
committermanojmj <mmj@gitlab.com>2019-07-17 01:11:10 +0530
commitce40c12849c8977e285962f8752cd78ac64c92ea (patch)
tree5744b8cdc8ec403df08305f034ec49d0bd05e9cf /spec/requests/api/users_spec.rb
parent3a55ba7de49a1e3ce54bbf7b10640d66ed5af0bc (diff)
downloadgitlab-ce-ce40c12849c8977e285962f8752cd78ac64c92ea.tar.gz
CE: Read and write User "Admin notes" via API
This change adds the ability to read and write admin notes for a user via the USER API
Diffstat (limited to 'spec/requests/api/users_spec.rb')
-rw-r--r--spec/requests/api/users_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index 46925daf40a..387efd882e5 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' }