diff options
Diffstat (limited to 'spec/finders/contributed_projects_finder_spec.rb')
-rw-r--r-- | spec/finders/contributed_projects_finder_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/finders/contributed_projects_finder_spec.rb b/spec/finders/contributed_projects_finder_spec.rb index 86d3e7f8f19..e8ce02122a1 100644 --- a/spec/finders/contributed_projects_finder_spec.rb +++ b/spec/finders/contributed_projects_finder_spec.rb @@ -23,9 +23,15 @@ RSpec.describe ContributedProjectsFinder do end describe 'activity without a current user' do - subject { finder.execute } + it 'does only return public projects' do + projects = finder.execute + expect(projects).to match_array([public_project]) + end - it { is_expected.to match_array([public_project]) } + it 'does return all projects when visibility gets ignored' do + projects = finder.execute(ignore_visibility: true) + expect(projects).to match_array([private_project, internal_project, public_project]) + end end describe 'activity with a current user' do |