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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
f5e4adc9
Commit
f5e4adc9
authored
Jun 18, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add spec replicating both label and milestone duplicated title issues
parent
a170c587
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
5 deletions
+38
-5
spec/lib/gitlab/import_export/project.light.json
spec/lib/gitlab/import_export/project.light.json
+3
-3
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
+35
-2
No files found.
spec/lib/gitlab/import_export/project.light.json
View file @
f5e4adc9
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
"milestones"
:
[
"milestones"
:
[
{
{
"id"
:
1
,
"id"
:
1
,
"title"
:
"
Project
milestone"
,
"title"
:
"
A
milestone"
,
"project_id"
:
8
,
"project_id"
:
8
,
"description"
:
"Project-level milestone"
,
"description"
:
"Project-level milestone"
,
"due_date"
:
null
,
"due_date"
:
null
,
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
"group_milestone_id"
:
null
,
"group_milestone_id"
:
null
,
"milestone"
:
{
"milestone"
:
{
"id"
:
1
,
"id"
:
1
,
"title"
:
"
Project
milestone"
,
"title"
:
"
A
milestone"
,
"project_id"
:
8
,
"project_id"
:
8
,
"description"
:
"Project-level milestone"
,
"description"
:
"Project-level milestone"
,
"due_date"
:
null
,
"due_date"
:
null
,
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
"updated_at"
:
"2017-08-15T18:37:40.795Z"
,
"updated_at"
:
"2017-08-15T18:37:40.795Z"
,
"label"
:
{
"label"
:
{
"id"
:
6
,
"id"
:
6
,
"title"
:
"Another
project
label"
,
"title"
:
"Another label"
,
"color"
:
"#A8D695"
,
"color"
:
"#A8D695"
,
"project_id"
:
null
,
"project_id"
:
null
,
"created_at"
:
"2017-08-15T18:37:19.698Z"
,
"created_at"
:
"2017-08-15T18:37:19.698Z"
,
...
...
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
View file @
f5e4adc9
...
@@ -368,5 +368,38 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
...
@@ -368,5 +368,38 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
milestones:
1
,
milestones:
1
,
first_issue_labels:
1
first_issue_labels:
1
end
end
context
'with existing group models'
do
let!
(
:project
)
do
create
(
:project
,
:builds_disabled
,
:issues_disabled
,
name:
'project'
,
path:
'project'
,
group:
create
(
:group
))
end
before
do
project_tree_restorer
.
instance_variable_set
(
:@path
,
"spec/lib/gitlab/import_export/project.light.json"
)
end
it
'imports labels'
do
create
(
:group_label
,
name:
'Another label'
,
group:
project
.
group
)
expect_any_instance_of
(
Gitlab
::
ImportExport
::
Shared
).
not_to
receive
(
:error
)
restored_project_json
expect
(
project
.
labels
.
count
).
to
eq
(
1
)
end
it
'imports milestones'
do
create
(
:milestone
,
name:
'A milestone'
,
group:
project
.
group
)
expect_any_instance_of
(
Gitlab
::
ImportExport
::
Shared
).
not_to
receive
(
:error
)
restored_project_json
expect
(
project
.
milestones
.
count
).
to
eq
(
1
)
end
end
end
end
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