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/models/bulk_imports/entity_spec.rb')
-rw-r--r--spec/models/bulk_imports/entity_spec.rb26
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