BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
3 deletions
+5
-3
notification_service.rb
app/services/notification_service.rb
+2
-3
test.rb
config/environments/test.rb
+2
-0
notification_service_spec.rb
spec/services/notification_service_spec.rb
+0
-0
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