diff --git a/app/helpers/epp/contacts_helper.rb b/app/helpers/epp/contacts_helper.rb index 955cb364c..16ec4ad54 100644 --- a/app/helpers/epp/contacts_helper.rb +++ b/app/helpers/epp/contacts_helper.rb @@ -41,6 +41,11 @@ module Epp render 'epp/contacts/info' end + def renew_contact + epp_errors << { code: '2101', msg: t(:'errors.messages.unimplemented_command') } + handle_errors + end + ## HELPER METHODS private diff --git a/config/locales/en.yml b/config/locales/en.yml index 6f229c2b2..23b836474 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -101,6 +101,7 @@ en: attr_missing: 'Required parameter missing: %{key}' repeating_postal_info: 'Only one of each postal info types may be provided' invalid_type: 'PostalInfo type is invalid' + unimplemented_command: 'Unimplemented command' setting_groups: codes: diff --git a/spec/epp/contact_spec.rb b/spec/epp/contact_spec.rb index 206a4827f..2743d610a 100644 --- a/spec/epp/contact_spec.rb +++ b/spec/epp/contact_spec.rb @@ -236,5 +236,14 @@ describe 'EPP Contact', epp: true do expect(response[:msg]).to eq('Authorization error') 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 diff --git a/spec/epp/requests/contacts/renew.xml b/spec/epp/requests/contacts/renew.xml new file mode 100644 index 000000000..aeffaa569 --- /dev/null +++ b/spec/epp/requests/contacts/renew.xml @@ -0,0 +1,15 @@ + + + + + + info-4444 + + 2fooBAR + + + + ABC-12345 + +