From 03486c107c849a5747723edaea083ad004a7598c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andres=20Keskk=C3=BCla?= Date: Tue, 12 Aug 2014 14:52:23 +0300 Subject: [PATCH] Fixed contact#info not returning value on failure --- app/helpers/epp/contacts_helper.rb | 3 ++- spec/epp/contact_spec.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/epp/contacts_helper.rb b/app/helpers/epp/contacts_helper.rb index ec4195446..07d43ad7e 100644 --- a/app/helpers/epp/contacts_helper.rb +++ b/app/helpers/epp/contacts_helper.rb @@ -22,6 +22,7 @@ module Epp::ContactsHelper end def delete_contact + #no deleting, implement PaperTrail or something similar. ph = params_hash['epp']['command']['delete']['delete'] @contact = Contact.where(code: ph[:id]).first @@ -62,7 +63,7 @@ module Epp::ContactsHelper render 'epp/error' end 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' end diff --git a/spec/epp/contact_spec.rb b/spec/epp/contact_spec.rb index 076c1b924..a5dcec55f 100644 --- a/spec/epp/contact_spec.rb +++ b/spec/epp/contact_spec.rb @@ -94,6 +94,7 @@ describe 'EPP Contact', epp: true do response = epp_request('contacts/info.xml') expect(response[:result_code]).to eq('2303') expect(response[:msg]).to eq('Object does not exist') + expect(response[:results][0][:value]).to eq('info-4444') end it 'returns info about contact' do