summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/import_export/attribute_cleaner_spec.rb
diff options
context:
space:
mode:
authorGeorge Koltsov <gkoltsov@gitlab.com>2019-07-12 10:05:55 +0100
committerGeorge Koltsov <gkoltsov@gitlab.com>2019-07-15 10:30:39 +0100
commitec512406857aecabc577b3fc70ec321982dd65a8 (patch)
tree6e63826c8b4129e0a19ddca879a018689d763996 /spec/lib/gitlab/import_export/attribute_cleaner_spec.rb
parentebed862a78c5561bb497fefa041172b4c7440c45 (diff)
downloadgitlab-ce-ec512406857aecabc577b3fc70ec321982dd65a8.tar.gz
Add commit_id to AttributeCleaner::ALLOWED_REFERENCESgeorgekoltsov/63955-fix-import-with-source-branch-deleted
Diffstat (limited to 'spec/lib/gitlab/import_export/attribute_cleaner_spec.rb')
-rw-r--r--spec/lib/gitlab/import_export/attribute_cleaner_spec.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/lib/gitlab/import_export/attribute_cleaner_spec.rb b/spec/lib/gitlab/import_export/attribute_cleaner_spec.rb
index 99669285d5b..873728f9909 100644
--- a/spec/lib/gitlab/import_export/attribute_cleaner_spec.rb
+++ b/spec/lib/gitlab/import_export/attribute_cleaner_spec.rb
@@ -22,7 +22,9 @@ describe Gitlab::ImportExport::AttributeCleaner do
'some_html' => '<p>dodgy html</p>',
'legit_html' => '<p>legit html</p>',
'_html' => '<p>perfectly ordinary html</p>',
- 'cached_markdown_version' => 12345
+ 'cached_markdown_version' => 12345,
+ 'group_id' => 99,
+ 'commit_id' => 99
}
end
@@ -31,7 +33,9 @@ describe Gitlab::ImportExport::AttributeCleaner do
'project_id' => 99,
'user_id' => 99,
'random_id_in_the_middle' => 99,
- 'notid' => 99
+ 'notid' => 99,
+ 'group_id' => 99,
+ 'commit_id' => 99
}
end
@@ -59,6 +63,6 @@ describe Gitlab::ImportExport::AttributeCleaner do
it 'does not remove excluded key if not listed' do
parsed_hash = described_class.clean(relation_hash: unsafe_hash, relation_class: relation_class)
- expect(parsed_hash.keys).to eq post_safe_hash.keys + excluded_keys
+ expect(parsed_hash.keys).to match_array post_safe_hash.keys + excluded_keys
end
end