Skip to content

Commit 461731f

Browse files
committed
fix notification_service specs
1 parent 7f214ce commit 461731f

File tree

4 files changed

+144
-209
lines changed

4 files changed

+144
-209
lines changed

app/services/notification_service.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ def new_note(note)
148148

149149
# build notify method like 'note_commit_email'
150150
notify_method = "note_#{note.noteable_type.underscore}_email".to_sym
151-
152151
recipients.each do |recipient|
153152
mailer.send(notify_method, recipient.id, note.id).deliver_later
154153
end
@@ -371,7 +370,7 @@ def close_resource_email(target, project, current_user, method)
371370
recipients = build_recipients(target, project, current_user)
372371

373372
recipients.each do |recipient|
374-
mailer.send(method, recipient.id, target.id, current_user.id).deliver
373+
mailer.send(method, recipient.id, target.id, current_user.id).deliver_later
375374
end
376375
end
377376

@@ -396,7 +395,7 @@ def reopen_resource_email(target, project, current_user, method, status)
396395
recipients = build_recipients(target, project, current_user)
397396

398397
recipients.each do |recipient|
399-
mailer.send(method, recipient.id, target.id, status, current_user.id).deliver
398+
mailer.send(method, recipient.id, target.id, status, current_user.id).deliver_later
400399
end
401400
end
402401

config/environments/test.rb

+2
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@
3232
config.eager_load = false
3333

3434
config.cache_store = :null_store
35+
36+
config.active_job.queue_adapter = :test
3537
end

0 commit comments

Comments
 (0)