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/tracker_spec.rb')
-rw-r--r--spec/models/bulk_imports/tracker_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/models/bulk_imports/tracker_spec.rb b/spec/models/bulk_imports/tracker_spec.rb
index edd9adfa5f6..25cd5489a9f 100644
--- a/spec/models/bulk_imports/tracker_spec.rb
+++ b/spec/models/bulk_imports/tracker_spec.rb
@@ -83,5 +83,31 @@ RSpec.describe BulkImports::Tracker, type: :model, feature_category: :importers
"'InexistingPipeline' is not a valid BulkImport Pipeline"
)
end
+
+ context 'when using delegation methods' do
+ context 'with group pipelines' do
+ let(:entity) { create(:bulk_import_entity) }
+
+ it 'does not raise' do
+ entity.pipelines.each do |pipeline|
+ tracker = create(:bulk_import_tracker, entity: entity, pipeline_name: pipeline[:pipeline])
+ expect { tracker.abort_on_failure? }.not_to raise_error
+ expect { tracker.file_extraction_pipeline? }.not_to raise_error
+ end
+ end
+ end
+
+ context 'with project pipelines' do
+ let(:entity) { create(:bulk_import_entity, :project_entity) }
+
+ it 'does not raise' do
+ entity.pipelines.each do |pipeline|
+ tracker = create(:bulk_import_tracker, entity: entity, pipeline_name: pipeline[:pipeline])
+ expect { tracker.abort_on_failure? }.not_to raise_error
+ expect { tracker.file_extraction_pipeline? }.not_to raise_error
+ end
+ end
+ end
+ end
end
end