Sent expired email to both registrants

This commit is contained in:
Alex Sherman 2021-03-03 19:42:54 +05:00
parent 632ee16acf
commit 52f473a9fa
2 changed files with 6 additions and 3 deletions

View file

@ -18,7 +18,8 @@ module Domains
RegistrantChangeMailer.expired(domain: domain,
registrar: domain.registrar,
registrant: domain.registrant,
send_to: domain.new_registrant_email).deliver_later
send_to: [domain.new_registrant_email,
domain.registrant.email]).deliver_later
end
def notify_pending_delete

View file

@ -73,10 +73,12 @@ class RegistrantChangeMailerTest < ActionMailer::TestCase
email = RegistrantChangeMailer.expired(domain: @domain,
registrar: @domain.registrar,
registrant: @domain.registrant,
send_to: @domain.new_registrant_email).deliver_now
send_to: [@domain.new_registrant_email,
@domain.registrant.email],
).deliver_now
assert_emails 1
assert_equal ['william@inbox.test'], email.to
assert_equal ['william@inbox.test', @domain.registrant.email], email.to
assert_equal 'Domeeni shop.test registreerija vahetuse taotlus on tühistatud' \
' / shop.test registrant change cancelled', email.subject
end