mirror of
https://github.com/internetee/registry.git
synced 2025-05-21 11:49:40 +02:00
Refactor another test
This commit is contained in:
parent
d81b346035
commit
4197aa470f
2 changed files with 6 additions and 26 deletions
|
@ -140,7 +140,9 @@ describe 'EPP Domain', epp: true do
|
||||||
}
|
}
|
||||||
|
|
||||||
it 'creates a domain with contacts' do
|
it 'creates a domain with contacts' do
|
||||||
response = epp_request('domains/create_wo_tech_contact.xml')
|
xml = domain_create_xml(contacts: [{contact_value: 'sh8013', contact_type: 'admin'}])
|
||||||
|
|
||||||
|
response = epp_request(xml, :xml)
|
||||||
expect(response[:result_code]).to eq('1000')
|
expect(response[:result_code]).to eq('1000')
|
||||||
expect(response[:msg]).to eq('Command completed successfully')
|
expect(response[:msg]).to eq('Command completed successfully')
|
||||||
expect(response[:clTRID]).to eq('ABC-12345')
|
expect(response[:clTRID]).to eq('ABC-12345')
|
||||||
|
@ -153,11 +155,11 @@ describe 'EPP Domain', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not create a domain without admin contact' do
|
it 'does not create a domain without admin contact' do
|
||||||
xml = domain_create_xml(contacts: [])
|
xml = domain_create_xml(contacts: [{contact_value: 'sh8013', contact_type: 'tech'}])
|
||||||
|
|
||||||
response = epp_request(xml, :xml)
|
response = epp_request(xml, :xml)
|
||||||
expect(response[:result_code]).to eq('2003')
|
expect(response[:result_code]).to eq('2306')
|
||||||
expect(response[:msg]).to eq('Required parameter missing: contact')
|
expect(response[:msg]).to eq('Admin contact is missing')
|
||||||
expect(response[:clTRID]).to eq('ABC-12345')
|
expect(response[:clTRID]).to eq('ABC-12345')
|
||||||
|
|
||||||
expect(Domain.count).to eq 0
|
expect(Domain.count).to eq 0
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
<?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:ns>
|
|
||||||
<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