mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 07:04:47 +02:00
Contact: Append prefix unless present
This commit is contained in:
parent
1bdfcef36b
commit
c7b4045018
2 changed files with 8 additions and 4 deletions
|
@ -71,8 +71,8 @@ class EppContactInfoBaseTest < EppTestCase
|
|||
end
|
||||
|
||||
def test_get_info_about_contact_without_prefix
|
||||
@contact.update_columns(code: 'TEST:JOHN-001')
|
||||
assert @contact.code, 'TEST:JOHN-001'
|
||||
@contact.update_columns(code: "#{@contact.registrar.code}:JOHN-001".upcase)
|
||||
assert @contact.code, "#{@contact.registrar.code}:JOHN-001".upcase
|
||||
|
||||
request_xml = <<-XML
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
|
@ -92,7 +92,7 @@ class EppContactInfoBaseTest < EppTestCase
|
|||
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
assert_epp_response :completed_successfully
|
||||
assert_equal 'TEST:JOHN-001', response_xml.at_xpath('//contact:id', contact: xml_schema).text
|
||||
assert_equal "#{@contact.registrar.code}:JOHN-001".upcase, response_xml.at_xpath('//contact:id', contact: xml_schema).text
|
||||
assert_equal '+555.555', response_xml.at_xpath('//contact:voice', contact: xml_schema).text
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue