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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d8db9e10
Commit
d8db9e10
authored
Nov 05, 2019
by
Luke Duncalfe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct event data for design import
And adding a missing spec for the event data.
parent
cbc8d5c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
ee/spec/fixtures/lib/gitlab/import_export/designs/project.json
...ec/fixtures/lib/gitlab/import_export/designs/project.json
+4
-4
ee/spec/lib/ee/gitlab/import_export/project_tree_restorer_spec.rb
...lib/ee/gitlab/import_export/project_tree_restorer_spec.rb
+4
-3
No files found.
ee/spec/fixtures/lib/gitlab/import_export/designs/project.json
View file @
d8db9e10
...
...
@@ -153,7 +153,7 @@
{
"design_id"
:
38
,
"version_id"
:
25
,
"event"
:
0
,
"event"
:
1
,
"design"
:{
"id"
:
38
,
"project_id"
:
30
,
...
...
@@ -183,7 +183,7 @@
{
"design_id"
:
38
,
"version_id"
:
26
,
"event"
:
0
,
"event"
:
1
,
"design"
:{
"id"
:
38
,
"project_id"
:
30
,
...
...
@@ -194,7 +194,7 @@
{
"design_id"
:
39
,
"version_id"
:
26
,
"event"
:
0
,
"event"
:
2
,
"design"
:{
"id"
:
39
,
"project_id"
:
30
,
...
...
@@ -366,7 +366,7 @@
{
"design_id"
:
42
,
"version_id"
:
29
,
"event"
:
0
,
"event"
:
1
,
"design"
:{
"id"
:
42
,
"project_id"
:
30
,
...
...
ee/spec/lib/ee/gitlab/import_export/project_tree_restorer_spec.rb
View file @
d8db9e10
...
...
@@ -30,15 +30,16 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
describe
'restores issue associations correctly'
do
let
(
:issue
)
{
project
.
issues
.
offset
(
index
).
first
}
where
(
:index
,
:design_filenames
,
:version_shas
,
:author_usernames
)
do
0
|
%w[chirrido3.jpg jonathan_richman.jpg mariavontrap.jpeg]
|
%w[27702d08f5ee021ae938737f84e8fe7c38599e85 9358d1bac8ff300d3d2597adaa2572a20f7f8703 e1a4a501bcb42f291f84e5d04c8f927821542fb6]
|
%w[user_1 user_1 user_2]
1
|
[
'1 (1).jpeg'
,
'2099743.jpg'
,
'a screenshot (1).jpg'
,
'chirrido3.jpg'
]
|
%w[73f871b4c8c1d65c62c460635e023179fb53abc4 8587e78ab6bda3bc820a9f014c3be4a21ad4fcc8 c9b5f067f3e892122a4b12b0a25a8089192f3ac8]
|
%w[user_1 user_2 user_2]
where
(
:index
,
:design_filenames
,
:version_shas
,
:
events
,
:
author_usernames
)
do
0
|
%w[chirrido3.jpg jonathan_richman.jpg mariavontrap.jpeg]
|
%w[27702d08f5ee021ae938737f84e8fe7c38599e85 9358d1bac8ff300d3d2597adaa2572a20f7f8703 e1a4a501bcb42f291f84e5d04c8f927821542fb6]
|
%w[
creation creation creation modification modification deletion]
|
%w[
user_1 user_1 user_2]
1
|
[
'1 (1).jpeg'
,
'2099743.jpg'
,
'a screenshot (1).jpg'
,
'chirrido3.jpg'
]
|
%w[73f871b4c8c1d65c62c460635e023179fb53abc4 8587e78ab6bda3bc820a9f014c3be4a21ad4fcc8 c9b5f067f3e892122a4b12b0a25a8089192f3ac8]
|
%w[
creation creation creation creation modification]
|
%w[
user_1 user_2 user_2]
end
with_them
do
it
do
expect
(
issue
.
designs
.
pluck
(
:filename
)).
to
contain_exactly
(
*
design_filenames
)
expect
(
issue
.
design_versions
.
pluck
(
:sha
)).
to
contain_exactly
(
*
version_shas
)
expect
(
issue
.
design_versions
.
flat_map
(
&
:actions
).
map
(
&
:event
)).
to
contain_exactly
(
*
events
)
expect
(
issue
.
design_versions
.
map
(
&
:author
).
map
(
&
:username
)).
to
contain_exactly
(
*
author_usernames
)
end
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