Strory#110308584 - hostname error responds in xml way of array

This commit is contained in:
Vladimir Krylov 2016-06-10 12:14:05 +03:00
parent 913d2b5bfc
commit 7c1c065ea4
2 changed files with 9 additions and 3 deletions

View file

@ -5,7 +5,13 @@ xml.epp_head do
xml.msg(x[:msg], 'lang' => 'en') xml.msg(x[:msg], 'lang' => 'en')
xml.value('xmlns:obj' => 'urn:ietf:params:xml:ns:obj') do xml.value('xmlns:obj' => 'urn:ietf:params:xml:ns:obj') do
xml.tag!("obj:#{x[:value][:obj]}", x[:value][:val]) if (val = x[:value][:val]).respond_to?(:each)
val.each do |el|
xml.tag!("obj:#{x[:value][:obj]}", el)
end
else
xml.tag!("obj:#{x[:value][:obj]}", val)
end
end if x[:value] end if x[:value]
x[:ext_values].each do |y| x[:ext_values].each do |y|

View file

@ -134,7 +134,7 @@ describe 'EPP Domain', epp: true do
key = d.dnskeys.last key = d.dnskeys.last
key.ds_alg.should == 3 key.ds_alg.should == 5
key.ds_key_tag.should_not be_blank key.ds_key_tag.should_not be_blank
key.ds_digest_type.should == Setting.ds_algorithm key.ds_digest_type.should == Setting.ds_algorithm
@ -394,7 +394,7 @@ describe 'EPP Domain', epp: true do
response = epp_plain_request(domain_create_with_invalid_ns_ip_xml) response = epp_plain_request(domain_create_with_invalid_ns_ip_xml)
response[:results][0][:result_code].should == '2005' response[:results][0][:result_code].should == '2005'
response[:results][0][:msg].should == 'IPv4 is invalid [ipv4]' response[:results][0][:msg].should == 'IPv4 is invalid [ipv4]'
response[:results][0][:value].should == ['192.0.2.2.invalid'] response[:results][0][:value].should == '192.0.2.2.invalid'
response[:results][1][:result_code].should == '2005' response[:results][1][:result_code].should == '2005'
response[:results][1][:msg].should == 'IPv6 is invalid [ipv6]' response[:results][1][:msg].should == 'IPv6 is invalid [ipv6]'
response[:results][1][:value].should == 'INVALID_IPV6' response[:results][1][:value].should == 'INVALID_IPV6'