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>2017-09-06 16:28:07 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-04 23:46:49 +0300
commit9f3995a0ca3d56fd8d219a2b01c3e6555fd91f27 (patch)
treecd09cb13db43b06b11be915f98a271f549288358 /spec/finders
parent28c440045ed001ab6029131ab7c842b390f4e186 (diff)
Find all children matching a query
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/group_children_finder_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/finders/group_children_finder_spec.rb b/spec/finders/group_children_finder_spec.rb
index a2a24b2a12e..8f83f88bb97 100644
--- a/spec/finders/group_children_finder_spec.rb
+++ b/spec/finders/group_children_finder_spec.rb
@@ -47,6 +47,20 @@ describe GroupChildrenFinder do
expect(finder.execute).to contain_exactly(matching_subgroup, matching_project)
end
+
+ context 'with matching children' do
+ it 'includes a group that has a subgroup matching the query' do
+ matching_subgroup = create(:group, name: 'testgroup', parent: subgroup)
+
+ expect(finder.execute).to contain_exactly(matching_subgroup)
+ end
+
+ it 'includes a group that has a project matching the query' do
+ matching_project = create(:project, namespace: subgroup, name: 'Testproject')
+
+ expect(finder.execute).to contain_exactly(matching_project)
+ end
+ end
end
end