mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Test improvement
This commit is contained in:
parent
cb1399862c
commit
e86f52afae
1 changed files with 45 additions and 0 deletions
|
@ -31,6 +31,51 @@ describe 'EPP Helper', epp: true do
|
||||||
|
|
||||||
generated = Nokogiri::XML(domain_create_xml).to_s.squish
|
generated = Nokogiri::XML(domain_create_xml).to_s.squish
|
||||||
expect(generated).to eq(expected)
|
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>
|
||||||
|
<create>
|
||||||
|
<domain:create
|
||||||
|
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||||
|
<domain:name>one.ee</domain:name>
|
||||||
|
<domain:period unit="d">345</domain:period>
|
||||||
|
<domain:ns>
|
||||||
|
<domain:hostObj>ns1.test.net</domain:hostObj>
|
||||||
|
<domain:hostObj>ns2.test.net</domain:hostObj>
|
||||||
|
</domain:ns>
|
||||||
|
<domain:registrant>32fsdaf</domain:registrant>
|
||||||
|
<domain:contact type="admin">2323rafaf</domain:contact>
|
||||||
|
<domain:contact type="tech">3dgxx</domain:contact>
|
||||||
|
<domain:contact type="tech">345xxv</domain:contact>
|
||||||
|
<domain:authInfo>
|
||||||
|
<domain:pw>sdgdgd4esfsa</domain:pw>
|
||||||
|
</domain:authInfo>
|
||||||
|
</domain:create>
|
||||||
|
</create>
|
||||||
|
<clTRID>ABC-12345</clTRID>
|
||||||
|
</command>
|
||||||
|
</epp>
|
||||||
|
').to_s.squish
|
||||||
|
|
||||||
|
xml = domain_create_xml(
|
||||||
|
name: 'one.ee',
|
||||||
|
period_value: '345',
|
||||||
|
period_unit: 'd',
|
||||||
|
nameservers: [{hostObj: 'ns1.test.net'}, {hostObj: 'ns2.test.net'}],
|
||||||
|
registrant: '32fsdaf',
|
||||||
|
contacts: [
|
||||||
|
{contact_value: '2323rafaf', contact_type: 'admin'},
|
||||||
|
{contact_value: '3dgxx', contact_type: 'tech'},
|
||||||
|
{contact_value: '345xxv', contact_type: 'tech'}
|
||||||
|
],
|
||||||
|
pw: 'sdgdgd4esfsa'
|
||||||
|
)
|
||||||
|
|
||||||
|
generated = Nokogiri::XML(xml).to_s.squish
|
||||||
|
expect(generated).to eq(expected)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue