diff --git a/app/controllers/epp/contacts_controller.rb b/app/controllers/epp/contacts_controller.rb index 7e2eb0b33..a30ab5649 100644 --- a/app/controllers/epp/contacts_controller.rb +++ b/app/controllers/epp/contacts_controller.rb @@ -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)}: postalInfo > org [org]" + msg: "#{I18n.t(:contact_org_error)}: postalInfo > org [org]" } end end diff --git a/config/locales/en.yml b/config/locales/en.yml index 7b02af598..f03c418a5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -489,4 +489,4 @@ en: sign_this_request: 'Sign this request' revoke_this_certificate: 'Revoke this certificate' crt_revoked: 'CRT (revoked)' - parameter_value_policy_error: 'Parameter value policy error' + contact_org_error: 'Parameter value policy error. Org should be blank' diff --git a/spec/epp/contact_spec.rb b/spec/epp/contact_spec.rb index d7786f7ee..8042e5d60 100644 --- a/spec/epp/contact_spec.rb +++ b/spec/epp/contact_spec.rb @@ -147,7 +147,8 @@ 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: postalInfo > org [org]' + response[:msg].should == + 'Parameter value policy error. Org should be blank: postalInfo > org [org]' response[:result_code].should == '2306' Contact.last.org_name.should == nil @@ -282,7 +283,8 @@ describe 'EPP Contact', epp: true do postalInfo: { org: { value: 'should not save' } } } }) - response[:msg].should == 'Parameter value policy error: postalInfo > org [org]' + response[:msg].should == + 'Parameter value policy error. Org should be blank: postalInfo > org [org]' response[:result_code].should == '2306' Contact.find_by(code: 'sh8013').org_name.should == nil