mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +02:00
Nameserver count validation 1
This commit is contained in:
parent
d01944fe21
commit
86dc8321c6
6 changed files with 82 additions and 1 deletions
|
@ -66,6 +66,18 @@ describe 'EPP Domain', epp: true do
|
|||
expect(response[:result_code]).to eq('2306')
|
||||
expect(response[:msg]).to eq('Required parameter missing - registrant')
|
||||
end
|
||||
|
||||
it 'does not create domain without nameservers' do
|
||||
response = epp_request('domains/create_wo_nameservers.xml')
|
||||
expect(response[:result_code]).to eq('2306')
|
||||
expect(response[:msg]).to eq('Required parameter missing - nameserver')
|
||||
end
|
||||
|
||||
it 'does not create domain with too many nameservers', pending: true do
|
||||
response = epp_request('domains/create_w_too_many_nameservers.xml')
|
||||
expect(response[:result_code]).to eq('2306')
|
||||
expect(response[:msg]).to eq('Domain must have 1-13 nameservers')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with juridical persion as an owner' do
|
||||
|
|
36
spec/epp/requests/domains/create_w_too_many_nameservers.xml
Normal file
36
spec/epp/requests/domains/create_w_too_many_nameservers.xml
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?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:hostObj>ns1.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns2.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns3.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns4.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns5.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns6.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns7.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns8.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns9.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns10.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns11.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns12.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns13.example.net</domain:hostObj>
|
||||
<domain:hostObj>ns14.example.net</domain:hostObj>
|
||||
</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>
|
18
spec/epp/requests/domains/create_wo_nameservers.xml
Normal file
18
spec/epp/requests/domains/create_wo_nameservers.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?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:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:create>
|
||||
</create>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
</command>
|
||||
</epp>
|
Loading…
Add table
Add a link
Reference in a new issue