remove hard coded review email addresses
This commit is contained in:
parent
2233d73c39
commit
3f77a00870
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user