Improved parameter policy error

This commit is contained in:
Priit Tark 2015-03-10 11:07:59 +02:00
parent 94a3b7beff
commit 2d5787a308
2 changed files with 3 additions and 3 deletions

View file

@ -128,7 +128,7 @@ class Epp::ContactsController < EppController
return true if params[:parsed_frame].css('postalInfo org').text.blank?
epp_errors << {
code: '2306',
msg: I18n.t(:parameter_value_policy_error)
msg: "#{I18n.t(:parameter_value_policy_error)}: postalInfo > org [org]"
}
end
end

View file

@ -147,7 +147,7 @@ describe 'EPP Contact', epp: true do
it 'should return parameter value policy errror' do
response = create_request({ postalInfo: { org: { value: 'should not save' } } })
response[:msg].should == 'Parameter value policy error'
response[:msg].should == 'Parameter value policy error: postalInfo > org [org]'
response[:result_code].should == '2306'
Contact.last.org_name.should == nil
@ -282,7 +282,7 @@ describe 'EPP Contact', epp: true do
postalInfo: { org: { value: 'should not save' } }
}
})
response[:msg].should == 'Parameter value policy error'
response[:msg].should == 'Parameter value policy error: postalInfo > org [org]'
response[:result_code].should == '2306'
Contact.find_by(code: 'sh8013').org_name.should == nil