remove hard coded review email addresses

This commit is contained in:
Mark Moser 2016-09-15 13:40:43 -05:00
parent 2233d73c39
commit 3f77a00870
2 changed files with 2 additions and 9 deletions

View File

@ -2,14 +2,7 @@
class ReviewerMailer < ApplicationMailer class ReviewerMailer < ApplicationMailer
def candidate_submission candidate def candidate_submission candidate
@candidate = candidate @candidate = candidate
recipients = candidate.quiz.reviewers.map(&:email)
# 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
mail to: recipients, subject: "Skills Assessment Results" mail to: recipients, subject: "Skills Assessment Results"
end end

View File

@ -6,7 +6,7 @@ class ReviewerMailerTest < ActionMailer::TestCase
candidate = candidates :dawn candidate = candidates :dawn
mail = ReviewerMailer.candidate_submission candidate mail = ReviewerMailer.candidate_submission candidate
assert_match "Results", mail.subject 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_equal [ENV["default_mail_from"]], mail.from
assert_match candidate.test_hash, mail.body.encoded assert_match candidate.test_hash, mail.body.encoded
end end