Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-01-20 14:21:49 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-01-22 19:02:04 +0300
commit2c3c5b35549185080296670cfe6710aa80f99944 (patch)
tree86e718db224300ca248a524f1dd061bdda56376e /spec/finders
parentc56326fc3ef75767abf324f614a4be46153efbb3 (diff)
Don't include projects shared as group-descendants
When a project is shared with a group, it should not be included as a descendant on the group dashboard.
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/group_descendants_finder_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/finders/group_descendants_finder_spec.rb b/spec/finders/group_descendants_finder_spec.rb
index ae050f36b4a..9cadd9a6000 100644
--- a/spec/finders/group_descendants_finder_spec.rb
+++ b/spec/finders/group_descendants_finder_spec.rb
@@ -35,6 +35,15 @@ describe GroupDescendantsFinder do
expect(finder.execute).to contain_exactly(project)
end
+ it 'does not include projects shared with the group' do
+ project = create(:project, namespace: group)
+ other_project = create(:project)
+ other_project.project_group_links.create(group: group,
+ group_access: ProjectGroupLink::MASTER)
+
+ expect(finder.execute).to contain_exactly(project)
+ end
+
context 'when archived is `true`' do
let(:params) { { archived: 'true' } }
@@ -64,7 +73,7 @@ describe GroupDescendantsFinder do
end
context 'with a filter' do
- let(:params) { { filter: 'test' } }
+ let(:params) { { filter: 'tes' } }
it 'includes only projects matching the filter' do
_other_project = create(:project, namespace: group)