mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Fixed contact#info not returning value on failure
This commit is contained in:
parent
2220846b9f
commit
03486c107c
2 changed files with 3 additions and 1 deletions
|
@ -22,6 +22,7 @@ module Epp::ContactsHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete_contact
|
def delete_contact
|
||||||
|
#no deleting, implement PaperTrail or something similar.
|
||||||
ph = params_hash['epp']['command']['delete']['delete']
|
ph = params_hash['epp']['command']['delete']['delete']
|
||||||
|
|
||||||
@contact = Contact.where(code: ph[:id]).first
|
@contact = Contact.where(code: ph[:id]).first
|
||||||
|
@ -62,7 +63,7 @@ module Epp::ContactsHelper
|
||||||
render 'epp/error'
|
render 'epp/error'
|
||||||
end
|
end
|
||||||
rescue NoMethodError => e
|
rescue NoMethodError => e
|
||||||
epp_errors << { code: '2303', msg: t('errors.messages.epp_obj_does_not_exist') }
|
epp_errors << { code: '2303', msg: t('errors.messages.epp_obj_does_not_exist'), value: { obj: 'id', val: ph[:id] } }
|
||||||
render 'epp/error'
|
render 'epp/error'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,7 @@ describe 'EPP Contact', epp: true do
|
||||||
response = epp_request('contacts/info.xml')
|
response = epp_request('contacts/info.xml')
|
||||||
expect(response[:result_code]).to eq('2303')
|
expect(response[:result_code]).to eq('2303')
|
||||||
expect(response[:msg]).to eq('Object does not exist')
|
expect(response[:msg]).to eq('Object does not exist')
|
||||||
|
expect(response[:results][0][:value]).to eq('info-4444')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns info about contact' do
|
it 'returns info about contact' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue