mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
Merge branch 'master' of github.com:internetee/registry
This commit is contained in:
commit
22baafab6d
4 changed files with 32 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
15
spec/epp/requests/contacts/info.xml
Normal file
15
spec/epp/requests/contacts/info.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>
|
||||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue