Add a test to domain renew

This commit is contained in:
Martin Lensment 2014-08-11 11:48:03 +03:00
parent 8baa2e12c9
commit a3abfa73e5
5 changed files with 29 additions and 6 deletions

View file

@ -150,6 +150,13 @@ describe 'EPP Domain', epp: true do
expect(response[:results][0][:result_code]).to eq('2306')
expect(response[:results][0][:msg]).to eq('Given and current expire dates do not match')
end
it 'returns an error when given and current exp dates do not match' do
response = epp_request('domains/renew_w_invalid_period.xml')
expect(response[:results][0][:result_code]).to eq('2004')
expect(response[:results][0][:msg]).to eq('Period must add up to 1, 2 or 3 years')
expect(response[:results][0][:value]).to eq('4')
end
end
it 'checks a domain' do

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<renew>
<domain:renew
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>example.ee</domain:name>
<domain:curExpDate>2014-08-07</domain:curExpDate>
<domain:period unit="y">4</domain:period>
</domain:renew>
</renew>
<clTRID>ABC-12345</clTRID>
</command>
</epp>