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
Jérome Perrin
gitlab-ce
Commits
8df63d15
Commit
8df63d15
authored
Apr 21, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update specs to accomodate issuable assign changes
parent
4adfd501
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
21 deletions
+31
-21
spec/services/issues/bulk_update_service_spec.rb
spec/services/issues/bulk_update_service_spec.rb
+1
-1
spec/services/issues/create_service_spec.rb
spec/services/issues/create_service_spec.rb
+14
-14
spec/services/issues/update_service_spec.rb
spec/services/issues/update_service_spec.rb
+8
-3
spec/services/merge_requests/update_service_spec.rb
spec/services/merge_requests/update_service_spec.rb
+8
-3
No files found.
spec/services/issues/bulk_update_service_spec.rb
View file @
8df63d15
...
...
@@ -100,7 +100,7 @@ describe Issues::BulkUpdateService, services: true do
describe
:update_milestone
do
before
do
@milestone
=
create
:milestone
@milestone
=
create
(
:milestone
,
project:
@project
)
@params
=
{
issues_ids:
[
issue
.
id
],
milestone_id:
@milestone
.
id
...
...
spec/services/issues/create_service_spec.rb
View file @
8df63d15
...
...
@@ -6,31 +6,31 @@ describe Issues::CreateService, services: true do
let
(
:assignee
)
{
create
(
:user
)
}
describe
:execute
do
let
(
:issue
)
{
Issues
::
CreateService
.
new
(
project
,
user
,
opts
).
execute
}
context
'valid params'
do
before
do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
assignee
,
:master
]
end
opts
=
{
title:
'Awesome issue'
,
let
(
:opts
)
do
{
title:
'Awesome issue'
,
description:
'please fix'
,
assignee:
assignee
}
@issue
=
Issues
::
CreateService
.
new
(
project
,
user
,
opts
).
execute
assignee:
assignee
}
end
it
{
expect
(
@
issue
).
to
be_valid
}
it
{
expect
(
@
issue
.
title
).
to
eq
(
'Awesome issue'
)
}
it
{
expect
(
@
issue
.
assignee
).
to
eq
assignee
}
it
{
expect
(
issue
).
to
be_valid
}
it
{
expect
(
issue
.
title
).
to
eq
(
'Awesome issue'
)
}
it
{
expect
(
issue
.
assignee
).
to
eq
assignee
}
it
'creates a pending todo for new assignee'
do
attributes
=
{
project:
project
,
author:
user
,
user:
assignee
,
target_id:
@
issue
.
id
,
target_type:
@
issue
.
class
.
name
,
target_id:
issue
.
id
,
target_type:
issue
.
class
.
name
,
action:
Todo
::
ASSIGNED
,
state: :pending
}
...
...
@@ -39,8 +39,8 @@ describe Issues::CreateService, services: true do
end
context
'label that belongs to different project'
do
let
(
:issue
)
{
Issues
::
CreateService
.
new
(
project
,
user
,
opts
).
execute
}
let
(
:label
)
{
create
(
:label
)
}
let
(
:opts
)
do
{
title:
'Title'
,
description:
'Description'
,
...
...
@@ -53,15 +53,15 @@ describe Issues::CreateService, services: true do
end
context
'milestone that belongs to different project'
do
let
(
:issue
)
{
Issues
::
CreateService
.
new
(
project
,
user
,
opts
).
execute
}
let
(
:milestone
)
{
create
(
:milestone
)
}
let
(
:opts
)
do
{
title:
'Title'
,
description:
'Description'
,
milestone_id:
milestone
.
id
}
end
it
'does not assign
label
'
do
it
'does not assign
milestone
'
do
expect
(
issue
.
milestone
).
to_not
eq
milestone
end
end
...
...
spec/services/issues/update_service_spec.rb
View file @
8df63d15
...
...
@@ -4,10 +4,15 @@ describe Issues::UpdateService, services: true do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:user3
)
{
create
(
:user
)
}
let
(
:
issue
)
{
create
(
:issue
,
title:
'Old title'
,
assignee_id:
user3
.
id
)
}
let
(
:label
)
{
create
(
:label
)
}
let
(
:
project
)
{
create
(
:empty_project
)
}
let
(
:label
)
{
create
(
:label
,
project:
project
)
}
let
(
:label2
)
{
create
(
:label
)
}
let
(
:project
)
{
issue
.
project
}
let
(
:issue
)
do
create
(
:issue
,
title:
'Old title'
,
assignee_id:
user3
.
id
,
project:
project
)
end
before
do
project
.
team
<<
[
user
,
:master
]
...
...
spec/services/merge_requests/update_service_spec.rb
View file @
8df63d15
require
'spec_helper'
describe
MergeRequests
::
UpdateService
,
services:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:user3
)
{
create
(
:user
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
:simple
,
title:
'Old title'
,
assignee_id:
user3
.
id
)
}
let
(
:project
)
{
merge_request
.
project
}
let
(
:label
)
{
create
(
:label
)
}
let
(
:label
)
{
create
(
:label
,
project:
project
)
}
let
(
:label2
)
{
create
(
:label
)
}
let
(
:merge_request
)
do
create
(
:merge_request
,
:simple
,
title:
'Old title'
,
assignee_id:
user3
.
id
,
source_project:
project
)
end
before
do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user2
,
:developer
]
...
...
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