mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
Client Transaction ID specs
This commit is contained in:
parent
69be898d68
commit
920e54cd28
7 changed files with 14 additions and 5 deletions
|
@ -5,4 +5,8 @@ xml.epp('xmlns' => 'urn:ietf:params:xml:ns:epp-1.0', 'xmlns:xsi' => 'http://www.
|
|||
xml.msg('Command completed successfully')
|
||||
end
|
||||
end
|
||||
|
||||
xml.trID do
|
||||
xml.clTRID params[:clTRID]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ xml.epp('xmlns' => 'urn:ietf:params:xml:ns:epp-1.0', 'xmlns:xsi' => 'http://www.
|
|||
end
|
||||
|
||||
xml.trID do
|
||||
xml.svTRID 'svTrid'
|
||||
xml.clTRID 'wgyn001#10-02-08at13:58:06'
|
||||
#xml.svTRID 'svTrid'
|
||||
xml.clTRID params[:clTRID]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,6 +7,6 @@ xml.epp('xmlns' => 'urn:ietf:params:xml:ns:epp-1.0', 'xmlns:xsi' => 'http://www.
|
|||
end
|
||||
|
||||
xml.trID do
|
||||
xml.clTRID 'sample1trid'
|
||||
xml.clTRID params[:clTRID]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,6 +7,6 @@ xml.epp('xmlns' => 'urn:ietf:params:xml:ns:epp-1.0', 'xmlns:xsi' => 'http://www.
|
|||
end
|
||||
|
||||
xml.trID do
|
||||
xml.clTRID 'sample1trid'
|
||||
xml.clTRID params[:clTRID]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,6 +10,7 @@ describe 'EPP Domain', epp: true do
|
|||
response = epp_request('create_domain.xml')
|
||||
expect(response[:result_code]).to eq('1000')
|
||||
expect(response[:msg]).to eq('Command completed successfully')
|
||||
expect(response[:clTRID]).to eq('dpbx005#10-01-29at19:21:47')
|
||||
expect(Domain.first.registrar.name).to eq('Zone Media OÜ')
|
||||
end
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ describe 'EPP Session', epp: true do
|
|||
response = epp_plain_request('login.xml')
|
||||
expect(response[:result_code]).to eq('2501')
|
||||
expect(response[:msg]).to eq('Authentication error; server closing connection')
|
||||
expect(response[:clTRID]).to eq('wgyn001#10-02-08at13:58:06')
|
||||
|
||||
Fabricate(:epp_user, active: false)
|
||||
|
||||
|
@ -30,6 +31,7 @@ describe 'EPP Session', epp: true do
|
|||
response = epp_plain_request('create_domain.xml')
|
||||
expect(response[:result_code]).to eq('2002')
|
||||
expect(response[:msg]).to eq('You need to login first.')
|
||||
expect(response[:clTRID]).to eq('dpbx005#10-01-29at19:21:47')
|
||||
end
|
||||
|
||||
context 'with valid user' do
|
||||
|
@ -39,6 +41,7 @@ describe 'EPP Session', epp: true do
|
|||
response = epp_plain_request('login.xml')
|
||||
expect(response[:result_code]).to eq('1000')
|
||||
expect(response[:msg]).to eq('Command completed successfully')
|
||||
expect(response[:clTRID]).to eq('wgyn001#10-02-08at13:58:06')
|
||||
end
|
||||
|
||||
it 'logs out epp user' do
|
||||
|
|
|
@ -17,7 +17,8 @@ module Epp
|
|||
def parse_response res
|
||||
{
|
||||
result_code: res.css('epp response result').first[:code],
|
||||
msg: res.css('epp response result msg').text
|
||||
msg: res.css('epp response result msg').text,
|
||||
clTRID: res.css('epp trID clTRID').text
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue