recruiter Resend welcome email

This commit is contained in:
Mark Moser
2016-09-15 10:01:31 -05:00
parent 9884748cf9
commit 372e86507e
9 changed files with 70 additions and 6 deletions

View File

@ -102,4 +102,15 @@ class RecruiterControllerTest < ActionDispatch::IntegrationTest
assert assigns(:candidate), "@candidate not present"
assert_match(/failed.*save/i, flash[:error])
end
test 'should queue up a welcome email [resend]' do
auth_recruiter
assert_enqueued_jobs 1 do
get resend_welcome_path(id: candidates(:peggy)), xhr: true
end
assert_response :success
data = JSON.parse(response.body)
assert_match 'queued', data["message"]
end
end