added test hash to reviewer email subject line

This commit is contained in:
Mark Moser 2016-11-16 18:47:15 -06:00
parent 9d12b694ce
commit 6ef65a2825
2 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,6 @@ class ReviewerMailer < ApplicationMailer
@candidate = candidate
recipients = candidate.quiz.reviewers.map(&:email)
mail to: recipients, subject: "Skills Assessment Results"
mail to: recipients, subject: "Skills Assessment Results - #{@candidate.test_hash}"
end
end

View File

@ -6,6 +6,7 @@ class ReviewerMailerTest < ActionMailer::TestCase
candidate = candidates :dawn
mail = ReviewerMailer.candidate_submission candidate
assert_match "Results", mail.subject
assert_match candidate.test_hash, mail.subject
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