diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-18 03:08:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-18 03:08:09 +0300 |
commit | 2a65a97e12a0754b9f0d91ee996a6e61e00c80c8 (patch) | |
tree | f439c93cc95a324ba7422b0b650431a628be9b07 /spec/lib/gitlab/import_export/attribute_configuration_spec.rb | |
parent | 2d96e61ceb1a3f26283dfba43f85d99488752296 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/import_export/attribute_configuration_spec.rb')
-rw-r--r-- | spec/lib/gitlab/import_export/attribute_configuration_spec.rb | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/spec/lib/gitlab/import_export/attribute_configuration_spec.rb b/spec/lib/gitlab/import_export/attribute_configuration_spec.rb index 41da1383f74..58da25bbedb 100644 --- a/spec/lib/gitlab/import_export/attribute_configuration_spec.rb +++ b/spec/lib/gitlab/import_export/attribute_configuration_spec.rb @@ -12,21 +12,11 @@ require 'spec_helper' describe 'Import/Export attribute configuration' do include ConfigurationHelper - let(:config_hash) { Gitlab::ImportExport::Config.new.to_h.deep_stringify_keys } - let(:relation_names) do - names = names_from_tree(config_hash.dig('tree', 'project')) - - # Remove duplicated or add missing models - # - project is not part of the tree, so it has to be added manually. - # - milestone, labels have both singular and plural versions in the tree, so remove the duplicates. - names.flatten.uniq - %w(milestones labels) + ['project'] - end - let(:safe_attributes_file) { 'spec/lib/gitlab/import_export/safe_model_attributes.yml' } let(:safe_model_attributes) { YAML.load_file(safe_attributes_file) } it 'has no new columns' do - relation_names.each do |relation_name| + relation_names_for(:project).each do |relation_name| relation_class = relation_class_for_name(relation_name) relation_attributes = relation_class.new.attributes.keys - relation_class.encrypted_attributes.keys.map(&:to_s) |