diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index d5d69248af7fc7a058ba9cb1f0921935285b583e..2cc9a9fd7bf770dd0a90b84096b2723dc66b2bb0 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 57baff3354f167a89f65e8531125620224d15dd1..4f56bceda44c9f2887a9e91dcf63f1a0cdaa0f41 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