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
Tatuya Kamada
gitlab-ce
Commits
461731f0
Commit
461731f0
authored
Nov 30, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix notification_service specs
parent
7f214cee
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
209 deletions
+144
-209
app/services/notification_service.rb
app/services/notification_service.rb
+2
-3
config/environments/test.rb
config/environments/test.rb
+2
-0
spec/services/notification_service_spec.rb
spec/services/notification_service_spec.rb
+139
-206
spec/spec_helper.rb
spec/spec_helper.rb
+1
-0
No files found.
app/services/notification_service.rb
View file @
461731f0
...
...
@@ -148,7 +148,6 @@ class NotificationService
# build notify method like 'note_commit_email'
notify_method
=
"note_
#{
note
.
noteable_type
.
underscore
}
_email"
.
to_sym
recipients
.
each
do
|
recipient
|
mailer
.
send
(
notify_method
,
recipient
.
id
,
note
.
id
).
deliver_later
end
...
...
@@ -371,7 +370,7 @@ class NotificationService
recipients
=
build_recipients
(
target
,
project
,
current_user
)
recipients
.
each
do
|
recipient
|
mailer
.
send
(
method
,
recipient
.
id
,
target
.
id
,
current_user
.
id
).
deliver
mailer
.
send
(
method
,
recipient
.
id
,
target
.
id
,
current_user
.
id
).
deliver
_later
end
end
...
...
@@ -396,7 +395,7 @@ class NotificationService
recipients
=
build_recipients
(
target
,
project
,
current_user
)
recipients
.
each
do
|
recipient
|
mailer
.
send
(
method
,
recipient
.
id
,
target
.
id
,
status
,
current_user
.
id
).
deliver
mailer
.
send
(
method
,
recipient
.
id
,
target
.
id
,
status
,
current_user
.
id
).
deliver
_later
end
end
...
...
config/environments/test.rb
View file @
461731f0
...
...
@@ -32,4 +32,6 @@ Rails.application.configure do
config
.
eager_load
=
false
config
.
cache_store
=
:null_store
config
.
active_job
.
queue_adapter
=
:test
end
spec/services/notification_service_spec.rb
View file @
461731f0
This diff is collapsed.
Click to expand it.
spec/spec_helper.rb
View file @
461731f0
...
...
@@ -31,6 +31,7 @@ RSpec.configure do |config|
config
.
include
StubConfiguration
config
.
include
RelativeUrl
,
type:
feature
config
.
include
TestEnv
config
.
include
ActiveJob
::
TestHelper
config
.
include
StubGitlabCalls
config
.
include
StubGitlabData
config
.
include
BenchmarkMatchers
,
benchmark:
true
...
...
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