diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/lib/bulk_imports/groups/stage_spec.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/lib/bulk_imports/groups/stage_spec.rb')
-rw-r--r-- | spec/lib/bulk_imports/groups/stage_spec.rb | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/spec/lib/bulk_imports/groups/stage_spec.rb b/spec/lib/bulk_imports/groups/stage_spec.rb index 528d65615b1..cc772f07d21 100644 --- a/spec/lib/bulk_imports/groups/stage_spec.rb +++ b/spec/lib/bulk_imports/groups/stage_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe BulkImports::Groups::Stage do +RSpec.describe BulkImports::Groups::Stage, feature_category: :importers do let(:ancestor) { create(:group) } let(:group) { build(:group, parent: ancestor) } let(:bulk_import) { build(:bulk_import) } @@ -77,6 +77,28 @@ RSpec.describe BulkImports::Groups::Stage do ) end + describe 'migrate projects flag' do + context 'when true' do + it 'includes project entities pipeline' do + entity.update!(migrate_projects: true) + + expect(described_class.new(entity).pipelines).to include( + hash_including({ pipeline: BulkImports::Groups::Pipelines::ProjectEntitiesPipeline }) + ) + end + end + + context 'when false' do + it 'does not include project entities pipeline' do + entity.update!(migrate_projects: false) + + expect(described_class.new(entity).pipelines).not_to include( + hash_including({ pipeline: BulkImports::Groups::Pipelines::ProjectEntitiesPipeline }) + ) + end + end + end + context 'when feature flag is enabled on root ancestor level' do it 'includes project entities pipeline' do stub_feature_flags(bulk_import_projects: ancestor) |