mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Contact renew command returns appropriate error
This commit is contained in:
parent
57b5008872
commit
bb6b0610be
4 changed files with 30 additions and 0 deletions
|
@ -41,6 +41,11 @@ module Epp
|
||||||
render 'epp/contacts/info'
|
render 'epp/contacts/info'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def renew_contact
|
||||||
|
epp_errors << { code: '2101', msg: t(:'errors.messages.unimplemented_command') }
|
||||||
|
handle_errors
|
||||||
|
end
|
||||||
|
|
||||||
## HELPER METHODS
|
## HELPER METHODS
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -101,6 +101,7 @@ en:
|
||||||
attr_missing: 'Required parameter missing: %{key}'
|
attr_missing: 'Required parameter missing: %{key}'
|
||||||
repeating_postal_info: 'Only one of each postal info types may be provided'
|
repeating_postal_info: 'Only one of each postal info types may be provided'
|
||||||
invalid_type: 'PostalInfo type is invalid'
|
invalid_type: 'PostalInfo type is invalid'
|
||||||
|
unimplemented_command: 'Unimplemented command'
|
||||||
|
|
||||||
setting_groups:
|
setting_groups:
|
||||||
codes:
|
codes:
|
||||||
|
|
|
@ -236,5 +236,14 @@ describe 'EPP Contact', epp: true do
|
||||||
expect(response[:msg]).to eq('Authorization error')
|
expect(response[:msg]).to eq('Authorization error')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'renew command' do
|
||||||
|
it 'returns 2101-unimplemented command' do
|
||||||
|
response = epp_request('contacts/renew.xml')
|
||||||
|
|
||||||
|
expect(response[:result_code]).to eq('2101')
|
||||||
|
expect(response[:msg]).to eq('Unimplemented command')
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
15
spec/epp/requests/contacts/renew.xml
Normal file
15
spec/epp/requests/contacts/renew.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||||
|
<command>
|
||||||
|
<renew>
|
||||||
|
<contact:renew
|
||||||
|
xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
|
||||||
|
<contact:id>info-4444</contact:id>
|
||||||
|
<contact:authInfo>
|
||||||
|
<contact:pw>2fooBAR</contact:pw>
|
||||||
|
</contact:authInfo>
|
||||||
|
</contact:renew>
|
||||||
|
</renew>
|
||||||
|
<clTRID>ABC-12345</clTRID>
|
||||||
|
</command>
|
||||||
|
</epp>
|
Loading…
Add table
Add a link
Reference in a new issue