remove hard coded review email addresses
This commit is contained in:
parent
2233d73c39
commit
3f77a00870
@ -2,14 +2,7 @@
|
||||
class ReviewerMailer < ApplicationMailer
|
||||
def candidate_submission candidate
|
||||
@candidate = candidate
|
||||
|
||||
# TODO: candidate.reviewers.map(:email)
|
||||
if Rails.env.production?
|
||||
recipients = ["harish.bhavanichikar@perficient.com", "jacob.schulke@perficient.com",
|
||||
"jennifer.siegfried@perficient.com", "martin.ridgway@perficient.com"]
|
||||
else
|
||||
recipients = ["fed.reviewer@mailinator.com"]
|
||||
end
|
||||
recipients = candidate.quiz.reviewers.map(&:email)
|
||||
|
||||
mail to: recipients, subject: "Skills Assessment Results"
|
||||
end
|
||||
|
@ -6,7 +6,7 @@ class ReviewerMailerTest < ActionMailer::TestCase
|
||||
candidate = candidates :dawn
|
||||
mail = ReviewerMailer.candidate_submission candidate
|
||||
assert_match "Results", mail.subject
|
||||
# assert_equal [candidate.recruiter.email], mail.to
|
||||
assert_equal candidate.quiz.reviewers.map(&:email), mail.to
|
||||
assert_equal [ENV["default_mail_from"]], mail.from
|
||||
assert_match candidate.test_hash, mail.body.encoded
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user