mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Make sure what expired domain emails will not be sent to non-valid addreses
This commit is contained in:
parent
91093b274d
commit
29f7aa19ac
4 changed files with 33 additions and 18 deletions
|
@ -22,4 +22,29 @@ class DomainExpireMailerTest < ActionMailer::TestCase
|
|||
assert_equal I18n.t("domain_expire_mailer.expired_soft.subject", domain_name: domain.name),
|
||||
email.subject
|
||||
end
|
||||
|
||||
def test_delivers_domain_expiration_soft_email_if_auto_fd
|
||||
domain = domains(:shop)
|
||||
assert_not domain.force_delete_scheduled?
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
email = 'some@strangesentence@internet.ee'
|
||||
|
||||
Truemail.configure.default_validation_type = :regex
|
||||
|
||||
contact = domain.admin_contacts.first
|
||||
contact.update_attribute(:email, email)
|
||||
contact.email_verification.verify
|
||||
|
||||
assert contact.email_verification_failed?
|
||||
|
||||
domain.reload
|
||||
|
||||
assert domain.force_delete_scheduled?
|
||||
|
||||
email = DomainExpireMailer.expired_soft(domain: domain, registrar: domain.registrar).deliver_now
|
||||
|
||||
assert_emails 1
|
||||
assert_equal I18n.t("domain_expire_mailer.expired_soft.subject", domain_name: domain.name),
|
||||
email.subject
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue