diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /spec/support/shared_examples/namespaces | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'spec/support/shared_examples/namespaces')
-rw-r--r-- | spec/support/shared_examples/namespaces/traversal_scope_examples.rb | 22 |
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 |