Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
77794579
Commit
77794579
authored
Jun 14, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix merge
parent
9ff19904
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
lib/gitlab/import_export/project_tree_restorer.rb
lib/gitlab/import_export/project_tree_restorer.rb
+1
-1
spec/lib/gitlab/import_export/reader_spec.rb
spec/lib/gitlab/import_export/reader_spec.rb
+5
-5
No files found.
lib/gitlab/import_export/project_tree_restorer.rb
View file @
77794579
...
...
@@ -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
)
...
...
spec/lib/gitlab/import_export/reader_spec.rb
View file @
77794579
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment