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/models/bulk_imports/entity_spec.rb | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'spec/models/bulk_imports/entity_spec.rb')
-rw-r--r-- | spec/models/bulk_imports/entity_spec.rb | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/spec/models/bulk_imports/entity_spec.rb b/spec/models/bulk_imports/entity_spec.rb index 6f6a7c9bcd8..874009d552a 100644 --- a/spec/models/bulk_imports/entity_spec.rb +++ b/spec/models/bulk_imports/entity_spec.rb @@ -160,7 +160,7 @@ RSpec.describe BulkImports::Entity, type: :model do it 'returns group pipelines' do entity = build(:bulk_import_entity, :group_entity) - expect(entity.pipelines.flatten).to include(BulkImports::Groups::Pipelines::GroupPipeline) + expect(entity.pipelines.collect { _1[:pipeline] }).to include(BulkImports::Groups::Pipelines::GroupPipeline) end end @@ -168,29 +168,7 @@ RSpec.describe BulkImports::Entity, type: :model do it 'returns project pipelines' do entity = build(:bulk_import_entity, :project_entity) - expect(entity.pipelines.flatten).to include(BulkImports::Projects::Pipelines::ProjectPipeline) - end - end - end - - describe '#create_pipeline_trackers!' do - context 'when entity is group' do - it 'creates trackers for group entity' do - entity = create(:bulk_import_entity, :group_entity) - entity.create_pipeline_trackers! - - expect(entity.trackers.count).to eq(BulkImports::Groups::Stage.new(entity).pipelines.count) - expect(entity.trackers.map(&:pipeline_name)).to include(BulkImports::Groups::Pipelines::GroupPipeline.to_s) - end - end - - context 'when entity is project' do - it 'creates trackers for project entity' do - entity = create(:bulk_import_entity, :project_entity) - entity.create_pipeline_trackers! - - expect(entity.trackers.count).to eq(BulkImports::Projects::Stage.new(entity).pipelines.count) - expect(entity.trackers.map(&:pipeline_name)).to include(BulkImports::Projects::Pipelines::ProjectPipeline.to_s) + expect(entity.pipelines.collect { _1[:pipeline] }).to include(BulkImports::Projects::Pipelines::ProjectPipeline) end end end |