Attach nameservers with attributes

This commit is contained in:
Martin Lensment 2014-08-05 17:19:23 +03:00
parent 356835bebf
commit d46640713b
6 changed files with 79 additions and 3 deletions

View file

@ -84,6 +84,14 @@ describe 'EPP Domain', epp: true do
expect(response[:result_code]).to eq('2005')
expect(response[:msg]).to eq('Hostname is invalid')
end
it 'creates domain with nameservers with ips' do
response = epp_request('domains/create_w_host_attrs.xml')
expect(Domain.first.nameservers.count).to eq(2)
ns = Domain.first.nameservers.first
expect(ns.ip).to eq('192.0.2.2')
end
end
context 'with juridical persion as an owner' do

View file

@ -0,0 +1,30 @@
<?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>example.ee</domain:name>
<domain:period unit="y">1</domain:period>
<domain:ns>
<domain:hostAttr>
<domain:hostName>ns1.example.net</domain:hostName>
<domain:hostAddr ip="v4">192.0.2.2</domain:hostAddr>
<domain:hostAddr ip="v6">1080:0:0:0:8:800:200C:417A</domain:hostAddr>
</domain:hostAttr>
<domain:hostAttr>
<domain:hostName>ns2.example.net</domain:hostName>
</domain:hostAttr>
</domain:ns>
<domain:registrant>jd1234</domain:registrant>
<domain:contact type="admin">sh8013</domain:contact>
<domain:contact type="tech">sh8013</domain:contact>
<domain:contact type="tech">sh801333</domain:contact>
<domain:authInfo>
<domain:pw>2fooBAR</domain:pw>
</domain:authInfo>
</domain:create>
</create>
<clTRID>ABC-12345</clTRID>
</command>
</epp>