mailer work
This commit is contained in:
@ -9,11 +9,7 @@ class RecruiterMailerPreview < ActionMailer::Preview
|
||||
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
|
||||
def candidate_reviewed
|
||||
RecruiterMailer.candidate_reviewed Candidate.find_by(test_hash: 's6oFExZliYYFx') # Stacy
|
||||
end
|
||||
end
|
||||
|
@ -22,21 +22,14 @@ class RecruiterMailerTest < ActionMailer::TestCase
|
||||
assert_match manager.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
|
||||
test "candidate_reviewed" do
|
||||
candidate = candidates :stacy
|
||||
mail = RecruiterMailer.interview_declined candidate
|
||||
mail = RecruiterMailer.candidate_reviewed 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.review_status, mail.body.encoded
|
||||
assert_match candidate.name, mail.body.encoded
|
||||
assert_match candidate.review_comments, mail.body.encoded
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user