diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
commit | 14bd84b61276ef29b97d23642d698de769bacfd2 (patch) | |
tree | f9eba90140c1bd874211dea17750a0d422c04080 /spec/lib/gitlab/import_export/attributes_finder_spec.rb | |
parent | 891c388697b2db0d8ee0c8358a9bdbf6dc56d581 (diff) |
Add latest changes from gitlab-org/gitlab@15-10-stable-eev15.10.0-rc42
Diffstat (limited to 'spec/lib/gitlab/import_export/attributes_finder_spec.rb')
-rw-r--r-- | spec/lib/gitlab/import_export/attributes_finder_spec.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/lib/gitlab/import_export/attributes_finder_spec.rb b/spec/lib/gitlab/import_export/attributes_finder_spec.rb index 6536b895b2f..767b7a3c84e 100644 --- a/spec/lib/gitlab/import_export/attributes_finder_spec.rb +++ b/spec/lib/gitlab/import_export/attributes_finder_spec.rb @@ -2,7 +2,7 @@ require 'fast_spec_helper' -RSpec.describe Gitlab::ImportExport::AttributesFinder do +RSpec.describe Gitlab::ImportExport::AttributesFinder, feature_category: :importers do describe '#find_root' do subject { described_class.new(config: config).find_root(model_key) } @@ -207,6 +207,19 @@ RSpec.describe Gitlab::ImportExport::AttributesFinder do it { is_expected.to be_nil } end + + context 'when include_import_only_tree is true' do + subject { described_class.new(config: config).find_relations_tree(model_key, include_import_only_tree: true) } + + let(:config) do + { + tree: { project: { ci_pipelines: { stages: { builds: nil } } } }, + import_only_tree: { project: { ci_pipelines: { stages: { statuses: nil } } } } + } + end + + it { is_expected.to eq({ ci_pipelines: { stages: { builds: nil, statuses: nil } } }) } + end end describe '#find_excluded_keys' do |