diff options
author | George Tsiolis <tsiolis.g@gmail.com> | 2018-09-07 18:08:55 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-09-07 18:08:55 +0300 |
commit | 124cece3b39f5cc38686df39c179b1a61ecbd562 (patch) | |
tree | 3b5ea888156c05fe8cd6a6cab69cbd9721d565a7 /spec/finders/contributed_projects_finder_spec.rb | |
parent | 272281e4729c9e2193acea84394a191cfe2496af (diff) |
Include private contributions in user contribution graph
Diffstat (limited to 'spec/finders/contributed_projects_finder_spec.rb')
-rw-r--r-- | spec/finders/contributed_projects_finder_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/finders/contributed_projects_finder_spec.rb b/spec/finders/contributed_projects_finder_spec.rb index 9155a8d6fe9..81fb4e3561c 100644 --- a/spec/finders/contributed_projects_finder_spec.rb +++ b/spec/finders/contributed_projects_finder_spec.rb @@ -8,6 +8,7 @@ describe ContributedProjectsFinder do let!(:public_project) { create(:project, :public) } let!(:private_project) { create(:project, :private) } + let!(:internal_project) { create(:project, :internal) } before do private_project.add_maintainer(source_user) @@ -16,17 +17,18 @@ describe ContributedProjectsFinder do create(:push_event, project: public_project, author: source_user) create(:push_event, project: private_project, author: source_user) + create(:push_event, project: internal_project, author: source_user) end - describe 'without a current user' do + describe 'activity without a current user' do subject { finder.execute } - it { is_expected.to eq([public_project]) } + it { is_expected.to match_array([public_project]) } end - describe 'with a current user' do + describe 'activity with a current user' do subject { finder.execute(current_user) } - it { is_expected.to eq([private_project, public_project]) } + it { is_expected.to match_array([private_project, internal_project, public_project]) } end end |