Merge branch 'master' of github.com:internetee/registry

This commit is contained in:
Martin Lensment 2014-07-30 17:09:51 +03:00
commit 22baafab6d
4 changed files with 32 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View 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>
<info>
<contact:info
xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<contact:id>sh8013</contact:id>
<contact:authInfo>
<contact:pw>2fooBAR</contact:pw>
</contact:authInfo>
</contact:info>
</info>
<clTRID>ABC-12345</clTRID>
</command>
</epp>