diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-09-21 17:10:33 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-09-26 21:14:19 +0300 |
commit | d70b7a490dae32435c5c906bc6f923676c52a9ea (patch) | |
tree | 47e317492536a2da0edccdf5fa12a55407a7115f /spec/requests | |
parent | 4d88f6496836c7fbf8a0f58e4d2604bf2c3f96d5 (diff) |
find_user users helper method no longer overrides find_user API helper method.
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) |