mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Display status in domain info
This commit is contained in:
parent
785ac5450f
commit
a66450bdd1
2 changed files with 8 additions and 2 deletions
|
@ -7,7 +7,11 @@ xml.epp_head do
|
|||
xml.resData do
|
||||
xml.tag!('domain:infData', 'xmlns:domain' => 'urn:ietf:params:xml:ns:domain-1.0') do
|
||||
xml.tag!('domain:name', @domain.name)
|
||||
xml.tag!('domain:status', 's' => @domain.status) if @domain.status
|
||||
@domain.domain_statuses.each do |x|
|
||||
xml.tag!('domain:status', x.description, 's' => x.value) unless x.description.blank?
|
||||
xml.tag!('domain:status', 's' => x.value) if x.description.blank?
|
||||
end
|
||||
|
||||
xml.tag!('domain:registrant', @domain.owner_contact_code)
|
||||
|
||||
@domain.tech_contacts.each do |x|
|
||||
|
|
|
@ -208,13 +208,15 @@ describe 'EPP Domain', epp: true do
|
|||
|
||||
it 'returns domain info' do
|
||||
d = Domain.first
|
||||
|
||||
d.domain_statuses.create(setting: Setting.find_by(code: 'client_hold'), description: 'Payment overdue.')
|
||||
response = epp_request(domain_info_xml, :xml)
|
||||
expect(response[:results][0][:result_code]).to eq('1000')
|
||||
expect(response[:results][0][:msg]).to eq('Command completed successfully')
|
||||
|
||||
inf_data = response[:parsed].css('resData infData')
|
||||
expect(inf_data.css('name').text).to eq('example.ee')
|
||||
expect(inf_data.css('status').text).to eq('Payment overdue.')
|
||||
expect(inf_data.css('status').first[:s]).to eq('clientHold')
|
||||
expect(inf_data.css('registrant').text).to eq(d.owner_contact_code)
|
||||
|
||||
admin_contacts_from_request = inf_data.css('contact[type="admin"]').map { |x| x.text }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue