diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-10 18:55:52 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-04 22:49:41 +0200 |
commit | 6388b8feec28b0f0ca2f9e6d9c5c7b4e404fed2f (patch) | |
tree | b6a92310327ed1bf38a2df3cdba67aa56391b83a /spec/finders | |
parent | 79cc3c8e3e7938ea53459e34ca585ae66791199e (diff) | |
download | gitlab-ce-6388b8feec28b0f0ca2f9e6d9c5c7b4e404fed2f.tar.gz |
Don't include the parent in search results if it matches
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/group_children_finder_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/finders/group_children_finder_spec.rb b/spec/finders/group_children_finder_spec.rb index 8f83f88bb97..3df153abc6a 100644 --- a/spec/finders/group_children_finder_spec.rb +++ b/spec/finders/group_children_finder_spec.rb @@ -60,6 +60,12 @@ describe GroupChildrenFinder do expect(finder.execute).to contain_exactly(matching_project) end + + it 'does not include the parent itself' do + group.update!(name: 'test') + + expect(finder.execute).not_to include(group) + end end end end |