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
iv
gitlab-ce
Commits
80a2eb5d
Commit
80a2eb5d
authored
Nov 17, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec
parent
8c308e3d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
spec/services/issues/update_service_spec.rb
spec/services/issues/update_service_spec.rb
+6
-4
No files found.
spec/services/issues/update_service_spec.rb
View file @
80a2eb5d
...
...
@@ -3,13 +3,15 @@ require 'spec_helper'
describe
Issues
::
UpdateService
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:issue
)
{
create
(
:issue
,
title:
'Old title'
,
assignee_id:
user
.
id
)
}
let
(
:user3
)
{
create
(
:user
)
}
let
(
:issue
)
{
create
(
:issue
,
title:
'Old title'
,
assignee_id:
user3
.
id
)
}
let
(
:label
)
{
create
(
:label
)
}
let
(
:project
)
{
issue
.
project
}
before
do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user2
,
:developer
]
project
.
team
<<
[
user3
,
:developer
]
end
describe
'execute'
do
...
...
@@ -37,8 +39,8 @@ describe Issues::UpdateService do
it
'should send email to user2 about assign of new issue and email to user about issue unassignment'
do
deliveries
=
ActionMailer
::
Base
.
deliveries
email
=
deliveries
.
last
recipients
=
deliveries
.
map
(
&
:to
).
uniq
.
flatten
expect
(
recipients
.
last
(
2
)).
to
include
(
user
.
email
,
user2
.
email
)
recipients
=
deliveries
.
last
(
2
).
map
(
&
:to
)
.
flatten
expect
(
recipients
).
to
include
(
user2
.
email
,
user3
.
email
)
expect
(
email
.
subject
).
to
include
(
issue
.
title
)
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