summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-06-14 10:20:47 +0200
committerJames Lopez <james@jameslopez.es>2016-06-14 10:20:47 +0200
commit77794579078a9c65a4e9ee4fa8d94113104f69b3 (patch)
tree5d71ce5255b4c611bf2e9da9823a20edc0ab71c1
parent9ff1990422eebc11e9c4b523b3b4a58d56943af2 (diff)
downloadgitlab-ce-77794579078a9c65a4e9ee4fa8d94113104f69b3.tar.gz
fix merge
-rw-r--r--lib/gitlab/import_export/project_tree_restorer.rb2
-rw-r--r--spec/lib/gitlab/import_export/reader_spec.rb10
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/gitlab/import_export/project_tree_restorer.rb b/lib/gitlab/import_export/project_tree_restorer.rb
index 43f033ac49c..c7c1c376ab7 100644
--- a/lib/gitlab/import_export/project_tree_restorer.rb
+++ b/lib/gitlab/import_export/project_tree_restorer.rb
@@ -90,7 +90,7 @@ module Gitlab
else
relation_hash = relation_item[sub_relation.to_s]
end
- return relation_hash, sub_relation
+ [relation_hash, sub_relation]
end
def create_relation(relation, relation_hash_list)
diff --git a/spec/lib/gitlab/import_export/reader_spec.rb b/spec/lib/gitlab/import_export/reader_spec.rb
index d7029c2efe6..109522fa626 100644
--- a/spec/lib/gitlab/import_export/reader_spec.rb
+++ b/spec/lib/gitlab/import_export/reader_spec.rb
@@ -57,25 +57,25 @@ describe Gitlab::ImportExport::Reader, lib: true do
end
it 'generates the correct hash for a relation with included attributes' do
- setup_yaml(project_tree: [:issues], included_attributes: {issues: [:name, :description]})
+ setup_yaml(project_tree: [:issues], included_attributes: { issues: [:name, :description] })
expect(described_class.new(shared: shared).project_tree).to match(include: [{ issues: { only: [:name, :description] } }])
end
it 'generates the correct hash for a relation with excluded attributes' do
- setup_yaml(project_tree: [:issues], excluded_attributes: {issues: [:name]})
+ setup_yaml(project_tree: [:issues], excluded_attributes: { issues: [:name] })
expect(described_class.new(shared: shared).project_tree).to match(include: [{ issues: { except: [:name] } }])
end
it 'generates the correct hash for a relation with both excluded and included attributes' do
- setup_yaml(project_tree: [:issues], excluded_attributes: {issues: [:name]}, included_attributes: {issues: [:description]})
+ setup_yaml(project_tree: [:issues], excluded_attributes: { issues: [:name] }, included_attributes: { issues: [:description] })
- expect(described_class.new(shared: shared).project_tree).to match(include: [{ issues: { except: [:name], only: [:description]} }])
+ expect(described_class.new(shared: shared).project_tree).to match(include: [{ issues: { except: [:name], only: [:description] } }])
end
it 'generates the correct hash for a relation with custom methods' do
- setup_yaml(project_tree: [:issues], methods: {issues: [:name]})
+ setup_yaml(project_tree: [:issues], methods: { issues: [:name] })
expect(described_class.new(shared: shared).project_tree).to match(include: [{ issues: { methods: [:name] } }])
end