mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Builder for transfer xml
This commit is contained in:
parent
ad03165546
commit
2a47e374f2
3 changed files with 77 additions and 0 deletions
|
@ -82,6 +82,11 @@ describe 'EPP Domain', epp: true do
|
|||
expect(trn_data.css('acID').text).to eq('10577829')
|
||||
expect(trn_data.css('exDate').text).to eq(d.valid_to.to_time.utc.to_s)
|
||||
end
|
||||
|
||||
it 'does not transfer with invalid pw' do
|
||||
response = epp_request('domains/transfer.xml')
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
context 'with citizen as an owner' do
|
||||
|
|
|
@ -275,5 +275,50 @@ describe 'EPP Helper', epp: true do
|
|||
generated = Nokogiri::XML(xml).to_s.squish
|
||||
expect(generated).to eq(expected)
|
||||
end
|
||||
|
||||
it 'generates valid transfer xml' do
|
||||
expected = Nokogiri::XML('<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<transfer op="query">
|
||||
<domain:transfer
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.ee</domain:name>
|
||||
<domain:authInfo>
|
||||
<domain:pw roid="JD1234-REP">98oiewslkfkd</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:transfer>
|
||||
</transfer>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
').to_s.squish
|
||||
|
||||
generated = Nokogiri::XML(domain_transfer_xml).to_s.squish
|
||||
expect(generated).to eq(expected)
|
||||
|
||||
|
||||
expected = Nokogiri::XML('<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<transfer op="approve">
|
||||
<domain:transfer
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>one.ee</domain:name>
|
||||
<domain:authInfo>
|
||||
<domain:pw roid="askdf">test</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:transfer>
|
||||
</transfer>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
').to_s.squish
|
||||
|
||||
xml = domain_transfer_xml(name: 'one.ee', op: 'approve', pw: 'test', roid: 'askdf')
|
||||
|
||||
generated = Nokogiri::XML(xml).to_s.squish
|
||||
expect(generated).to eq(expected)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue