mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 23:42:04 +02:00
Use translation file for errors, display reserved domain error through epp
This commit is contained in:
parent
e3c60d51fe
commit
d96b1b5deb
6 changed files with 40 additions and 2 deletions
|
@ -23,6 +23,14 @@ describe 'EPP Domain', epp: true do
|
|||
expect(response[:clTRID]).to eq('ABC-12345')
|
||||
end
|
||||
|
||||
it 'does not create reserved domain' do
|
||||
Fabricate(:reserved_domain)
|
||||
response = epp_request('domains/create_reserved.xml')
|
||||
expect(response[:result_code]).to eq('2302')
|
||||
expect(response[:msg]).to eq('Domain name is reserved or restricted')
|
||||
expect(response[:clTRID]).to eq('ABC-12345')
|
||||
end
|
||||
|
||||
it 'checks a domain' do
|
||||
response = epp_request('domains/check.xml')
|
||||
expect(response[:result_code]).to eq('1000')
|
||||
|
|
23
spec/epp/requests/domains/create_reserved.xml
Normal file
23
spec/epp/requests/domains/create_reserved.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?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>1162.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:ns>
|
||||
<domain:registrant>jd1234</domain:registrant>
|
||||
<domain:contact type="admin">sh8013</domain:contact>
|
||||
<domain:contact type="tech">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