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:
Diffstat (limited to 'spec/support/shared_examples/namespaces/traversal_scope_examples.rb')
-rw-r--r--spec/support/shared_examples/namespaces/traversal_scope_examples.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/support/shared_examples/namespaces/traversal_scope_examples.rb b/spec/support/shared_examples/namespaces/traversal_scope_examples.rb
index f1ace9878e9..45da1d382c1 100644
--- a/spec/support/shared_examples/namespaces/traversal_scope_examples.rb
+++ b/spec/support/shared_examples/namespaces/traversal_scope_examples.rb
@@ -238,6 +238,12 @@ RSpec.shared_examples 'namespace traversal scopes' do
subject { described_class.where(id: [nested_group_1, nested_group_2]).self_and_descendants(include_self: false) }
it { is_expected.to contain_exactly(deep_nested_group_1, deep_nested_group_2) }
+
+ context 'with duplicate descendants' do
+ subject { described_class.where(id: [group_1, nested_group_1]).self_and_descendants(include_self: false) }
+
+ it { is_expected.to contain_exactly(nested_group_1, deep_nested_group_1) }
+ end
end
context 'with offset and limit' do
@@ -267,6 +273,14 @@ RSpec.shared_examples 'namespace traversal scopes' do
include_examples '.self_and_descendants'
end
+
+ context 'with linear_scopes_superset feature flag disabled' do
+ before do
+ stub_feature_flags(linear_scopes_superset: false)
+ end
+
+ include_examples '.self_and_descendants'
+ end
end
shared_examples '.self_and_descendant_ids' do
@@ -310,6 +324,14 @@ RSpec.shared_examples 'namespace traversal scopes' do
include_examples '.self_and_descendant_ids'
end
+
+ context 'with linear_scopes_superset feature flag disabled' do
+ before do
+ stub_feature_flags(linear_scopes_superset: false)
+ end
+
+ include_examples '.self_and_descendant_ids'
+ end
end
shared_examples '.self_and_hierarchy' do