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
d6d1daf4
Commit
d6d1daf4
authored
Apr 27, 2016
by
Long Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update specs
parent
247ae960
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
spec/services/issues/move_service_spec.rb
spec/services/issues/move_service_spec.rb
+4
-9
No files found.
spec/services/issues/move_service_spec.rb
View file @
d6d1daf4
...
...
@@ -7,10 +7,11 @@ describe Issues::MoveService, services: true do
let
(
:description
)
{
'Some issue description'
}
let
(
:old_project
)
{
create
(
:project
)
}
let
(
:new_project
)
{
create
(
:project
)
}
let!
(
:milestone1
)
{
create
(
:milestone
,
project_id:
old_project
.
id
,
title:
'v9.0'
)
}
let
(
:old_issue
)
do
create
(
:issue
,
title:
title
,
description:
description
,
project:
old_project
,
author:
author
)
project:
old_project
,
author:
author
,
milestone:
milestone1
)
end
let
(
:move_service
)
do
...
...
@@ -22,8 +23,7 @@ describe Issues::MoveService, services: true do
old_project
.
team
<<
[
user
,
:reporter
]
new_project
.
team
<<
[
user
,
:reporter
]
create
(
:milestone
,
project_id:
old_project
.
id
,
title:
'v1.0'
)
create
(
:milestone
,
project_id:
new_project
.
id
,
title:
'v1.0'
)
create
(
:milestone
,
project_id:
new_project
.
id
,
title:
'v9.0'
)
old_issue
.
labels
<<
create
(
:label
,
project_id:
old_project
.
id
,
title:
'label1'
)
old_issue
.
labels
<<
create
(
:label
,
project_id:
old_project
.
id
,
title:
'label2'
)
...
...
@@ -49,7 +49,7 @@ describe Issues::MoveService, services: true do
end
it
'assigns milestone to new issue'
do
expect
(
new_issue
.
reload
.
milestone
.
title
).
to
eq
'v
1
.0'
expect
(
new_issue
.
reload
.
milestone
.
title
).
to
eq
'v
9
.0'
end
it
'assign labels to new issue'
do
...
...
@@ -92,11 +92,6 @@ describe Issues::MoveService, services: true do
expect
(
new_issue
.
author
).
to
eq
author
end
it
'removes data that is invalid in new context'
do
expect
(
new_issue
.
milestone
).
to
be_nil
expect
(
new_issue
.
labels
).
to
be_empty
end
it
'creates a new internal id for issue'
do
expect
(
new_issue
.
iid
).
to
be
1
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