diff options
Diffstat (limited to 'spec/models/bulk_imports/file_transfer/group_config_spec.rb')
-rw-r--r-- | spec/models/bulk_imports/file_transfer/group_config_spec.rb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/spec/models/bulk_imports/file_transfer/group_config_spec.rb b/spec/models/bulk_imports/file_transfer/group_config_spec.rb index 21da71de3c7..4611a00b0cc 100644 --- a/spec/models/bulk_imports/file_transfer/group_config_spec.rb +++ b/spec/models/bulk_imports/file_transfer/group_config_spec.rb @@ -12,8 +12,8 @@ RSpec.describe BulkImports::FileTransfer::GroupConfig do subject { described_class.new(exportable) } - describe '#exportable_tree' do - it 'returns exportable tree' do + describe '#portable_tree' do + it 'returns portable tree' do expect_next_instance_of(::Gitlab::ImportExport::AttributesFinder) do |finder| expect(finder).to receive(:find_root).with(:group).and_call_original end @@ -30,9 +30,21 @@ RSpec.describe BulkImports::FileTransfer::GroupConfig do end end - describe '#exportable_relations' do + describe '#portable_relations' do it 'returns a list of top level exportable relations' do expect(subject.portable_relations).to include('milestones', 'badges', 'boards', 'labels') end end + + describe '#top_relation_tree' do + it 'returns relation tree of a top level relation' do + expect(subject.top_relation_tree('labels')).to eq('priorities' => {}) + end + end + + describe '#relation_excluded_keys' do + it 'returns excluded keys for relation' do + expect(subject.relation_excluded_keys('group')).to include('owner_id') + end + end end |