summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-10-20 18:13:45 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-10-20 18:13:45 +0800
commit1cdad622aacf9ae7e7d61e575aaa77dddf7ae7b9 (patch)
tree62ccc2f5f30266f537a4dc97c27b2e85bc0c476f
parenta87b6cc3f550dff2fd4189970a3d2456052987a3 (diff)
downloadgitlab-ce-1cdad622aacf9ae7e7d61e575aaa77dddf7ae7b9.tar.gz
Should send to notification_email instead, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6342#note_17146325
-rw-r--r--app/services/notification_service.rb2
-rw-r--r--spec/models/project_services/pipeline_email_service_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index d5d69248af7..2cc9a9fd7bf 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -321,7 +321,7 @@ class NotificationService
pipeline,
pipeline.project,
nil, # The acting user, who won't be added to recipients
- action: pipeline.status).map(&:email)
+ action: pipeline.status).map(&:notification_email)
mailer.public_send(email_template, pipeline, recipients).deliver_later
end
diff --git a/spec/models/project_services/pipeline_email_service_spec.rb b/spec/models/project_services/pipeline_email_service_spec.rb
index 57baff3354f..4f56bceda44 100644
--- a/spec/models/project_services/pipeline_email_service_spec.rb
+++ b/spec/models/project_services/pipeline_email_service_spec.rb
@@ -58,7 +58,7 @@ describe PipelinesEmailService do
end
it 'sends email' do
- should_only_email(double(email: recipient), kind: :bcc)
+ should_only_email(double(notification_email: recipient), kind: :bcc)
end
end