mirror of
https://github.com/internetee/registry.git
synced 2025-05-30 17:33:57 +02:00
Updated contact org error
This commit is contained in:
parent
2d5787a308
commit
6ae1851868
3 changed files with 6 additions and 4 deletions
|
@ -128,7 +128,7 @@ class Epp::ContactsController < EppController
|
||||||
return true if params[:parsed_frame].css('postalInfo org').text.blank?
|
return true if params[:parsed_frame].css('postalInfo org').text.blank?
|
||||||
epp_errors << {
|
epp_errors << {
|
||||||
code: '2306',
|
code: '2306',
|
||||||
msg: "#{I18n.t(:parameter_value_policy_error)}: postalInfo > org [org]"
|
msg: "#{I18n.t(:contact_org_error)}: postalInfo > org [org]"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -489,4 +489,4 @@ en:
|
||||||
sign_this_request: 'Sign this request'
|
sign_this_request: 'Sign this request'
|
||||||
revoke_this_certificate: 'Revoke this certificate'
|
revoke_this_certificate: 'Revoke this certificate'
|
||||||
crt_revoked: 'CRT (revoked)'
|
crt_revoked: 'CRT (revoked)'
|
||||||
parameter_value_policy_error: 'Parameter value policy error'
|
contact_org_error: 'Parameter value policy error. Org should be blank'
|
||||||
|
|
|
@ -147,7 +147,8 @@ describe 'EPP Contact', epp: true do
|
||||||
|
|
||||||
it 'should return parameter value policy errror' do
|
it 'should return parameter value policy errror' do
|
||||||
response = create_request({ postalInfo: { org: { value: 'should not save' } } })
|
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'
|
response[:result_code].should == '2306'
|
||||||
|
|
||||||
Contact.last.org_name.should == nil
|
Contact.last.org_name.should == nil
|
||||||
|
@ -282,7 +283,8 @@ describe 'EPP Contact', epp: true do
|
||||||
postalInfo: { org: { value: 'should not save' } }
|
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'
|
response[:result_code].should == '2306'
|
||||||
|
|
||||||
Contact.find_by(code: 'sh8013').org_name.should == nil
|
Contact.find_by(code: 'sh8013').org_name.should == nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue