mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +02:00
Contact info now has correct ident
This commit is contained in:
parent
7d0fea739b
commit
2c547c3909
2 changed files with 24 additions and 1 deletions
|
@ -34,7 +34,6 @@ xml.epp_head do
|
||||||
xml.tag!('contact:upID', @contact.updator.try(:registrar))
|
xml.tag!('contact:upID', @contact.updator.try(:registrar))
|
||||||
xml.tag!('contact:upDate', @contact.updated_at)
|
xml.tag!('contact:upDate', @contact.updated_at)
|
||||||
end
|
end
|
||||||
xml.tag!('contact:ident', @contact.ident, type: @contact.ident_type, cc: @contact.ident_country_code)
|
|
||||||
# xml.tag!('contact:trDate', '123') if false
|
# xml.tag!('contact:trDate', '123') if false
|
||||||
if can? :view_password, @contact, @password
|
if can? :view_password, @contact, @password
|
||||||
xml.tag!('contact:authInfo') do
|
xml.tag!('contact:authInfo') do
|
||||||
|
@ -47,6 +46,14 @@ xml.epp_head do
|
||||||
# xml << render('/epp/contacts/disclosure_policy')
|
# xml << render('/epp/contacts/disclosure_policy')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if can? :view_full_info, @contact, @password
|
||||||
|
xml.tag!('extension') do
|
||||||
|
xml.tag!('eis:extdata', 'xmlns:eis' => 'urn:ee:eis:xml:epp:eis-1.0') do
|
||||||
|
xml.tag!('eis:ident', @contact.ident,
|
||||||
|
type: @contact.ident_type, cc: @contact.ident_country_code)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
xml << render('/epp/shared/trID')
|
xml << render('/epp/shared/trID')
|
||||||
end
|
end
|
||||||
|
|
|
@ -470,6 +470,22 @@ describe 'EPP Contact', epp: true do
|
||||||
contact.css('name').first.text.should == 'Johnny Awesome'
|
contact.css('name').first.text.should == 'Johnny Awesome'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should return ident in extension' do
|
||||||
|
@registrar1_contact = Fabricate(
|
||||||
|
:contact, code: 'info-ident', registrar: @registrar1,
|
||||||
|
name: 'Johnny Awesome', address: Fabricate(:address))
|
||||||
|
|
||||||
|
response = info_request({ id: { value: @registrar1_contact.code } })
|
||||||
|
response[:msg].should == 'Command completed successfully'
|
||||||
|
response[:result_code].should == '1000'
|
||||||
|
|
||||||
|
contact = response[:parsed].css('resData infData')
|
||||||
|
contact.css('ident').first.should == nil # ident should be in extension
|
||||||
|
|
||||||
|
contact = response[:parsed].css('extension')
|
||||||
|
contact.css('ident').first.text.should == '37605030299'
|
||||||
|
end
|
||||||
|
|
||||||
it 'returns no authorization error for wrong password when owner' do
|
it 'returns no authorization error for wrong password when owner' do
|
||||||
response = info_request({ authInfo: { pw: { value: 'wrong-pw' } } })
|
response = info_request({ authInfo: { pw: { value: 'wrong-pw' } } })
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue