Fix error on birthday contact creation validation fail

This commit is contained in:
Alex Sherman 2021-05-26 16:33:05 +05:00
parent 82c048b316
commit 194489e40f
2 changed files with 37 additions and 1 deletions

View file

@ -41,6 +41,42 @@ class EppContactCreateBaseTest < EppTestCase
assert_not_empty contact.code
end
def test_responses_with_error_on_birthday
name = 'new'
email = 'new@registrar.test'
phone = '+1.2'
request_xml = <<-XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
<command>
<create>
<contact:create xmlns:contact="https://epp.tld.ee/schema/contact-ee-1.1.xsd">
<contact:postalInfo>
<contact:name>#{name}</contact:name>
</contact:postalInfo>
<contact:voice>#{phone}</contact:voice>
<contact:email>#{email}</contact:email>
</contact:create>
</create>
<extension>
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
<eis:ident type="birthday" cc="LV">31-12-2000</eis:ident>
</eis:extdata>
</extension>
</command>
</epp>
XML
assert_no_difference 'Contact.count' do
post epp_create_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
assert_epp_response :parameter_value_syntax_error
end
def test_responces_error_with_email_error
name = 'new'
email = 'new@registrar@test'