diff --git a/app/helpers/epp/contacts_helper.rb b/app/helpers/epp/contacts_helper.rb index b2bf4d02b..702efa5ee 100644 --- a/app/helpers/epp/contacts_helper.rb +++ b/app/helpers/epp/contacts_helper.rb @@ -168,7 +168,7 @@ module Epp::ContactsHelper end def ident_type - result = parsed_frame.css('ident').first.try(:attributes).try(:[], 'flag').try(:value) + result = parsed_frame.css('ident').first.try(:attributes).try(:[], 'type').try(:value) return nil unless result Contact::IDENT_TYPES.any? { |type| return type if result.include?(type) } diff --git a/spec/epp/contact_spec.rb b/spec/epp/contact_spec.rb index 9158529e7..1dce1be90 100644 --- a/spec/epp/contact_spec.rb +++ b/spec/epp/contact_spec.rb @@ -58,7 +58,7 @@ describe 'EPP Contact', epp: true do end it 'successfully saves ident type' do - xml = {ident: { value: '37605030299' , attrs: { flag: 'birthday' } }} + xml = {ident: { value: '37605030299' , attrs: { type: 'birthday' } }} response = epp_request(create_contact_xml(xml), :xml) expect(Contact.last.ident_type).to eq('birthday') end diff --git a/spec/support/epp_contact_xml_helper.rb b/spec/support/epp_contact_xml_helper.rb index 3d13d7805..6be1d4b6a 100644 --- a/spec/support/epp_contact_xml_helper.rb +++ b/spec/support/epp_contact_xml_helper.rb @@ -11,7 +11,7 @@ module EppContactXmlHelper }, voice: { value: '+372.1234567' }, email: { value: 'test@example.example' }, - ident: { value: '37605030299' , attrs: { flag: 'op' } } + ident: { value: '37605030299' , attrs: { type: 'op' } } } xml_params = defaults.deep_merge(xml_params)