mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
fb42ec138e
4 changed files with 18 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
xml.trID do
|
||||
xml.clTRID params[:clTRID]
|
||||
xml.clTRID params[:clTRID] if params[:clTRID].present?
|
||||
xml.svTRID @svTRID
|
||||
end
|
||||
|
|
|
@ -1931,10 +1931,10 @@ describe 'EPP Domain', epp: true do
|
|||
domain.save
|
||||
|
||||
xml = domain_info_xml(name: { value: domain.name })
|
||||
|
||||
response = epp_plain_request(xml, :xml)
|
||||
response[:results][0][:msg].should == 'Command completed successfully'
|
||||
response[:results][0][:result_code].should == '1000'
|
||||
response[:clTRID].should be_nil
|
||||
|
||||
inf_data = response[:parsed].css('resData infData')
|
||||
inf_data.css('name').text.should == domain.name
|
||||
|
|
|
@ -46,6 +46,13 @@ describe 'EPP Session', epp: true do
|
|||
response[:clTRID].should == 'ABC-12345'
|
||||
end
|
||||
|
||||
it 'should not have clTRID in response if client does not send it' do
|
||||
epp_xml_no_cltrid = EppXml.new(cl_trid: '')
|
||||
wrong_user = epp_xml_no_cltrid.session.login(clID: { value: 'wrong-user' }, pw: { value: 'ghyt9e4fu' })
|
||||
response = epp_plain_request(wrong_user, :xml)
|
||||
response[:clTRID].should be_nil
|
||||
end
|
||||
|
||||
context 'with valid user' do
|
||||
it 'logs in epp user' do
|
||||
response = epp_plain_request(@login_xml_cache, :xml)
|
||||
|
|
|
@ -89,7 +89,7 @@ module Epp
|
|||
|
||||
obj = {
|
||||
results: [],
|
||||
clTRID: res.css('epp trID clTRID').text,
|
||||
clTRID: res.css('epp trID clTRID').first.try(:text),
|
||||
parsed: res.remove_namespaces!,
|
||||
raw: raw
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ module Epp
|
|||
|
||||
xml_params = defaults.deep_merge(xml_params)
|
||||
|
||||
epp_xml = EppXml::Domain.new(cl_trid: 'ABC-12345')
|
||||
epp_xml = EppXml::Domain.new(cl_trid: '')
|
||||
epp_xml.info(xml_params)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue