diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-29 19:31:31 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-29 19:31:31 +0000 |
commit | e810b8327513c3b07cb779dbce6c75dbcb49ca84 (patch) | |
tree | 65b220240faa9e191388c6ab233fed03da2b8713 /spec/finders | |
parent | 11e9b7b58837da351f08c18e6f0f4faba4d7d301 (diff) | |
download | gitlab-ce-e810b8327513c3b07cb779dbce6c75dbcb49ca84.tar.gz |
Add latest changes from gitlab-org/security/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/events_finder_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/finders/events_finder_spec.rb b/spec/finders/events_finder_spec.rb index 45a049f9442..b13ef7e94e7 100644 --- a/spec/finders/events_finder_spec.rb +++ b/spec/finders/events_finder_spec.rb @@ -4,6 +4,7 @@ require 'spec_helper' RSpec.describe EventsFinder do let_it_be(:user) { create(:user) } + let(:private_user) { create(:user, private_profile: true) } let(:other_user) { create(:user) } let(:project1) { create(:project, :private, creator_id: user.id, namespace: user.namespace) } @@ -57,6 +58,12 @@ RSpec.describe EventsFinder do expect(events).to be_empty end + + it 'returns nothing when the target profile is private' do + events = described_class.new(source: private_user, current_user: other_user).execute + + expect(events).to be_empty + end end describe 'wiki events feature flag' do |