diff --git a/app/helpers/epp/contacts_helper.rb b/app/helpers/epp/contacts_helper.rb
index acb6fe339..92fc6adc1 100644
--- a/app/helpers/epp/contacts_helper.rb
+++ b/app/helpers/epp/contacts_helper.rb
@@ -112,6 +112,7 @@ module Epp::ContactsHelper
contact_hash[:address_attributes] =
Address.extract_attributes(( @ph.try(:[], :postalInfo).try(:[], :addr) || [] ), type)
end
+ contact_hash[:ident_type] = ident_type unless ident_type.nil?
contact_hash
end
diff --git a/spec/epp/contact_spec.rb b/spec/epp/contact_spec.rb
index b8c7d920e..dbba0ab55 100644
--- a/spec/epp/contact_spec.rb
+++ b/spec/epp/contact_spec.rb
@@ -31,6 +31,8 @@ describe 'EPP Contact', epp: true do
expect(Contact.count).to eq(1)
expect(Contact.first.org_name).to eq('Example Inc.')
+ expect(Contact.first.ident).to eq '37605030299'
+ expect(Contact.first.ident_type).to eq 'op'
expect(Contact.first.address.street).to eq('123 Example Dr.')
expect(Contact.first.address.street2).to eq('Suite 100')
@@ -94,6 +96,8 @@ describe 'EPP Contact', epp: true do
expect(response[:msg]).to eq('Command completed successfully')
expect(Contact.first.name).to eq('John Doe')
expect(Contact.first.email).to eq('jdoe@example.com')
+ expect(Contact.first.ident).to eq('J836954')
+ expect(Contact.first.ident_type).to eq('passport')
end
it 'returns phone and email error' do
diff --git a/spec/epp/requests/contacts/update.xml b/spec/epp/requests/contacts/update.xml
index 5c396ad11..89fbeec1c 100644
--- a/spec/epp/requests/contacts/update.xml
+++ b/spec/epp/requests/contacts/update.xml
@@ -20,7 +20,7 @@
+123.7035555555
+1.7035555556
jdoe@example.com
- 37605030299
+ J836954
2fooBAR
diff --git a/spec/support/epp_contact_xml_builder.rb b/spec/support/epp_contact_xml_builder.rb
index 4fc211ff1..a97f154ad 100644
--- a/spec/support/epp_contact_xml_builder.rb
+++ b/spec/support/epp_contact_xml_builder.rb
@@ -58,7 +58,7 @@ module EppContactXmlBuilder
xml.tag!('contact:voice', (xml_params[:voice] || '+372.1234567')) unless xml_params[:voice] == false
xml.tag!('contact:fax', (xml_params[:fax] || '123123' )) unless xml_params[:fax] == false
xml.tag!('contact:email', (xml_params[:email] || 'example@test.example')) unless xml_params[:email] == false
- xml.tag!('contact:ident', (xml_params[:ident] || '37605030299')) unless xml_params[:ident] == false
+ xml.tag!('contact:ident', (xml_params[:ident] || '37605030299'), type: 'op') unless xml_params[:ident] == false
unless xml_params[:authInfo] == [false]
xml.tag!('contact:authInfo') do
xml.tag!('contact:pw', xml_params[:authInfo][:pw] ) unless xml_params[:authInfo][:pw] == false