recruiter notification on interview status change re: #85

This commit is contained in:
Mark Moser
2016-11-30 18:55:27 -06:00
parent bcb840c986
commit fa27aac083
9 changed files with 103 additions and 18 deletions

View File

@ -8,4 +8,12 @@ class RecruiterMailerPreview < ActionMailer::Preview
def candidate_submitted
RecruiterMailer.candidate_submitted Candidate.find_by(test_hash: 'OvP0ZqGKwJ0') # Dawn
end
def interview_requested
RecruiterMailer.interview_requested Candidate.find_by(test_hash: '6NjnourLE6Y') # Richard
end
def interview_declined
RecruiterMailer.interview_declined Candidate.find_by(test_hash: 's6oFExZliYYFx') # Stacy
end
end

View File

@ -19,4 +19,22 @@ class RecruiterMailerTest < ActionMailer::TestCase
assert_equal [ENV["default_mail_from"]], mail.from
assert_match candidate.name, mail.body.encoded
end
test "interview_requested" do
candidate = candidates :richard
mail = RecruiterMailer.interview_requested candidate
assert_match candidate.name, mail.subject
assert_equal [candidate.recruiter.email], mail.to
assert_equal [ENV["default_mail_from"]], mail.from
assert_match candidate.name, mail.body.encoded
end
test "interview_declined" do
candidate = candidates :stacy
mail = RecruiterMailer.interview_declined candidate
assert_match candidate.name, mail.subject
assert_equal [candidate.recruiter.email], mail.to
assert_equal [ENV["default_mail_from"]], mail.from
assert_match candidate.name, mail.body.encoded
end
end