diff options
Diffstat (limited to 'spec/lib/bulk_imports/ndjson_pipeline_spec.rb')
-rw-r--r-- | spec/lib/bulk_imports/ndjson_pipeline_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/bulk_imports/ndjson_pipeline_spec.rb b/spec/lib/bulk_imports/ndjson_pipeline_spec.rb index 57a258b0d9f..7d156c2c3df 100644 --- a/spec/lib/bulk_imports/ndjson_pipeline_spec.rb +++ b/spec/lib/bulk_imports/ndjson_pipeline_spec.rb @@ -186,4 +186,20 @@ RSpec.describe BulkImports::NdjsonPipeline do end end end + + describe '#relation_factory' do + context 'when portable is group' do + it 'returns group relation factory' do + expect(subject.relation_factory).to eq(Gitlab::ImportExport::Group::RelationFactory) + end + end + + context 'when portable is project' do + subject { NdjsonPipelineClass.new(project, user) } + + it 'returns project relation factory' do + expect(subject.relation_factory).to eq(Gitlab::ImportExport::Project::RelationFactory) + end + end + end end |