reviewer reminders
This commit is contained in:
parent
bf6c686e2e
commit
117b795a0c
@ -6,4 +6,10 @@ class ReviewerMailer < ApplicationMailer
|
|||||||
|
|
||||||
mail to: recipients, subject: "Skills Assessment Results - #{@candidate.test_hash}"
|
mail to: recipients, subject: "Skills Assessment Results - #{@candidate.test_hash}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def reminder reminder
|
||||||
|
@reminder = reminder
|
||||||
|
|
||||||
|
mail to: reminder.email, subject: "Review Reminder"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
9
app/views/reviewer_mailer/reminder.html.inky
Normal file
9
app/views/reviewer_mailer/reminder.html.inky
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<row>
|
||||||
|
<columns class="email-body">
|
||||||
|
<p>Hello <%= @reminder.name %>,</p>
|
||||||
|
<p>
|
||||||
|
Please review and vote on the results for <%= link_to nil, admin_result_url(@reminder.test_hash) %>
|
||||||
|
</p>
|
||||||
|
</columns>
|
||||||
|
</row>
|
||||||
|
|
5
app/views/reviewer_mailer/reminder.text.erb
Normal file
5
app/views/reviewer_mailer/reminder.text.erb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
PERFICIENT/digital SKILLS ASSESSMENT RESULTS
|
||||||
|
|
||||||
|
Hello <%= @reminder.name %>,
|
||||||
|
|
||||||
|
Please review and vote on the results for <%= admin_result_url(@reminder.test_hash) %>.
|
@ -4,4 +4,10 @@ class ReviewerMailerPreview < ActionMailer::Preview
|
|||||||
def candidate_submission
|
def candidate_submission
|
||||||
ReviewerMailer.candidate_submission Candidate.find_by(test_hash: 'OvP0ZqGKwJ0') # Dawn
|
ReviewerMailer.candidate_submission Candidate.find_by(test_hash: 'OvP0ZqGKwJ0') # Dawn
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def reminder
|
||||||
|
reminders = ReviewerReminder.new
|
||||||
|
reminder = reminders.reminders.first
|
||||||
|
ReviewerMailer.reminder reminder
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -11,4 +11,14 @@ class ReviewerMailerTest < ActionMailer::TestCase
|
|||||||
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
|
||||||
|
|
||||||
|
test "reminder" do
|
||||||
|
reminders = ReviewerReminder.new
|
||||||
|
reminder = reminders.reminders.first
|
||||||
|
mail = ReviewerMailer.reminder reminder
|
||||||
|
assert_match "Review Reminder", mail.subject
|
||||||
|
assert_equal [reminder.email], mail.to
|
||||||
|
assert_equal [ENV["default_mail_from"]], mail.from
|
||||||
|
assert_match reminder.test_hash, mail.body.encoded
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user