diff options
author | Rémy Coutable <remy@rymai.me> | 2017-09-27 11:29:57 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-09-27 11:29:57 +0000 |
commit | da7353d36c261885b77cf952ee3fff2c312ea199 (patch) | |
tree | 884ecfd0baacfc661044ed46adf4d27f22cdc545 /spec/requests | |
parent | 746481173aa83e578aa706622fae66a6f98affe9 (diff) | |
parent | d70b7a490dae32435c5c906bc6f923676c52a9ea (diff) | |
download | gitlab-ce-da7353d36c261885b77cf952ee3fff2c312ea199.tar.gz |
Merge branch '37467-helper-method-from-users-endpoint-overrides-api-helper-method' into 'master'
find_user users helper method no longer overrides find_user API helper method.
Closes #37467
See merge request gitlab-org/gitlab-ce!14418
Diffstat (limited to 'spec/requests')
-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 5b306ec6cbf..c30188b1b41 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -125,6 +125,15 @@ describe API::Users do end context "when admin" do + context 'when sudo is defined' do + it 'does not return 500' do + admin_personal_access_token = create(:personal_access_token, user: admin).token + get api("/users?private_token=#{admin_personal_access_token}&sudo=#{user.id}", admin) + + expect(response).to have_http_status(:success) + end + end + it "returns an array of users" do get api("/users", admin) |