mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
Add support of punycode domains in emails
This commit is contained in:
parent
56ac816dd1
commit
b4369bdcd0
6 changed files with 77 additions and 21 deletions
|
@ -270,6 +270,16 @@ class ContactTest < ActiveSupport::TestCase
|
|||
assert_equal domain.whois_record.try(:json).try(:[], 'registrant'), @contact.name
|
||||
end
|
||||
|
||||
def test_creates_email_verification_in_unicode
|
||||
unicode_email = 'suur@äri.ee'
|
||||
punycode_email = Contact.unicode_to_punycode(unicode_email)
|
||||
|
||||
@contact.email = punycode_email
|
||||
@contact.save
|
||||
|
||||
assert_equal @contact.email_verification.email, unicode_email
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def make_contact_free_of_domains_where_it_acts_as_a_registrant(contact)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue