diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-29 22:31:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-29 22:31:31 +0300 |
commit | e810b8327513c3b07cb779dbce6c75dbcb49ca84 (patch) | |
tree | 65b220240faa9e191388c6ab233fed03da2b8713 /spec/requests/api | |
parent | 11e9b7b58837da351f08c18e6f0f4faba4d7d301 (diff) |
Add latest changes from gitlab-org/security/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/requests/api')
-rw-r--r-- | spec/requests/api/events_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/requests/api/events_spec.rb b/spec/requests/api/events_spec.rb index 0425e0791eb..58a55c2e6d0 100644 --- a/spec/requests/api/events_spec.rb +++ b/spec/requests/api/events_spec.rb @@ -192,6 +192,19 @@ describe API::Events do end end + context 'when target users profile is private' do + it 'returns no events' do + user.update!(private_profile: true) + private_project.add_developer(non_member) + + get api("/users/#{user.username}/events", non_member) + + expect(response).to have_gitlab_http_status(:ok) + expect(response).to include_pagination_headers + expect(json_response).to eq([]) + end + end + context 'when scope is passed' do context 'when unauthenticated' do it 'returns no user events' do |