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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-05 09:12:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-05 09:12:41 +0300
commit7c0c3a7dc95668d20ec8f4bbc2d505f373b6032a (patch)
tree2034e645e8aada36db5d816d271d7f2d8728157d /spec/finders
parentd8abaef3c6859400b684427ba57aa247b6272cb1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/concerns/finder_with_group_hierarchy_spec.rb76
1 files changed, 0 insertions, 76 deletions
diff --git a/spec/finders/concerns/finder_with_group_hierarchy_spec.rb b/spec/finders/concerns/finder_with_group_hierarchy_spec.rb
index c96e35372d6..27f5192176d 100644
--- a/spec/finders/concerns/finder_with_group_hierarchy_spec.rb
+++ b/spec/finders/concerns/finder_with_group_hierarchy_spec.rb
@@ -129,80 +129,4 @@ RSpec.describe FinderWithGroupHierarchy do
expect { run_query(private_group) }.not_to exceed_query_limit(control)
end
end
-
- context 'when preload_max_access_levels_for_labels_finder is disabled' do
- # All test cases were copied from above, these will be removed once the FF is removed.
-
- before do
- stub_feature_flags(preload_max_access_levels_for_labels_finder: false)
- end
-
- context 'when specifying group' do
- it 'returns only the group by default' do
- finder = finder_class.new(user, group: group)
-
- expect(finder.execute).to match_array([group.id])
- end
- end
-
- context 'when specifying group_id' do
- it 'returns only the group by default' do
- finder = finder_class.new(user, group_id: group.id)
-
- expect(finder.execute).to match_array([group.id])
- end
- end
-
- context 'when including items from group ancestors' do
- before do
- private_subgroup.add_developer(user)
- end
-
- it 'returns group and its ancestors' do
- private_group.add_developer(user)
-
- finder = finder_class.new(user, group: private_subgroup, include_ancestor_groups: true)
-
- expect(finder.execute).to match_array([private_group.id, private_subgroup.id])
- end
-
- it 'ignores groups which user can not read' do
- finder = finder_class.new(user, group: private_subgroup, include_ancestor_groups: true)
-
- expect(finder.execute).to match_array([private_subgroup.id])
- end
-
- it 'returns them all when skip_authorization is true' do
- finder = finder_class.new(user, group: private_subgroup, include_ancestor_groups: true)
-
- expect(finder.execute(skip_authorization: true)).to match_array([private_group.id, private_subgroup.id])
- end
- end
-
- context 'when including items from group descendants' do
- before do
- private_subgroup.add_developer(user)
- end
-
- it 'returns items from group and its descendants' do
- private_group.add_developer(user)
-
- finder = finder_class.new(user, group: private_group, include_descendant_groups: true)
-
- expect(finder.execute).to match_array([private_group.id, private_subgroup.id])
- end
-
- it 'ignores items from groups which user can not read' do
- finder = finder_class.new(user, group: private_group, include_descendant_groups: true)
-
- expect(finder.execute).to match_array([private_subgroup.id])
- end
-
- it 'returns them all when skip_authorization is true' do
- finder = finder_class.new(user, group: private_group, include_descendant_groups: true)
-
- expect(finder.execute(skip_authorization: true)).to match_array([private_group.id, private_subgroup.id])
- end
- end
- end
end