diff --git a/app/controllers/epp/commands_controller.rb b/app/controllers/epp/commands_controller.rb index 4622c0b8c..38b2b065d 100644 --- a/app/controllers/epp/commands_controller.rb +++ b/app/controllers/epp/commands_controller.rb @@ -15,4 +15,8 @@ class Epp::CommandsController < ApplicationController def delete send("delete_#{OBJECT_TYPES[params_hash['epp']['xmlns:ns2']]}") end + + def info + send("info_#{OBJECT_TYPES[params_hash['epp']['xmlns:ns2']]}") + end end diff --git a/app/helpers/epp/contacts_helper.rb b/app/helpers/epp/contacts_helper.rb index 8ed4a799e..47e1ef291 100644 --- a/app/helpers/epp/contacts_helper.rb +++ b/app/helpers/epp/contacts_helper.rb @@ -52,6 +52,11 @@ module Epp::ContactsHelper end end + def info_contact + epp_errors << { code: '2101', msg: 'Unimplemented command' } + render 'epp/error' + end + private def ident_type diff --git a/spec/epp/contact_spec.rb b/spec/epp/contact_spec.rb index c999336b3..921b0bafd 100644 --- a/spec/epp/contact_spec.rb +++ b/spec/epp/contact_spec.rb @@ -56,6 +56,14 @@ describe 'EPP Contact', epp: true do end + #TODO replace after implementing info commad for contact + it 'returns error unimplemented command on info_contact' do + Fabricate(:contact) + response = epp_request('contacts/info.xml') + expect(response[:result_code]).to eq('2101') + expect(response[:msg]).to eq('Unimplemented command') + end + end end diff --git a/spec/epp/requests/contacts/info.xml b/spec/epp/requests/contacts/info.xml new file mode 100644 index 000000000..ec655ff99 --- /dev/null +++ b/spec/epp/requests/contacts/info.xml @@ -0,0 +1,15 @@ + + + + + + sh8013 + + 2fooBAR + + + + ABC-12345 + +