mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
412f154359
4 changed files with 16 additions and 6 deletions
|
@ -118,6 +118,9 @@ class Epp::ContactsController < EppController
|
|||
contact_org_disabled
|
||||
fax_disabled
|
||||
status_editing_disabled
|
||||
if params[:parsed_frame].css('ident').present?
|
||||
epp_errors << { code: '2306', msg: "#{I18n.t(:ident_update_error)} [ident]" }
|
||||
end
|
||||
requires 'id'
|
||||
@prefix = nil
|
||||
end
|
||||
|
|
|
@ -143,7 +143,6 @@ class Epp::Contact < Contact
|
|||
at.deep_merge!(self.class.attrs_from(frame.css('rem'), 'rem'))
|
||||
at.deep_merge!(self.class.attrs_from(frame.css('add')))
|
||||
at.deep_merge!(self.class.attrs_from(frame.css('chg')))
|
||||
at.merge!(self.class.ident_attrs(frame.css('ident').first))
|
||||
legal_frame = frame.css('legalDocument').first
|
||||
at[:legal_documents_attributes] = self.class.legal_document_attrs(legal_frame)
|
||||
self.deliver_emails = true # turn on email delivery for epp
|
||||
|
|
|
@ -505,6 +505,7 @@ en:
|
|||
crt_revoked: 'CRT (revoked)'
|
||||
contact_org_error: 'Parameter value policy error. Org must be blank'
|
||||
contact_fax_error: 'Parameter value policy error. Fax must be blank'
|
||||
ident_update_error: 'Parameter value policy error. Update of ident data not allowed'
|
||||
invoices: 'Invoices'
|
||||
no_such_user: 'No such user'
|
||||
log_in: 'Log in'
|
||||
|
|
|
@ -24,6 +24,12 @@ describe 'EPP Contact', epp: true do
|
|||
attrs: { type: 'pdf' }
|
||||
}
|
||||
}
|
||||
@update_extension = {
|
||||
legalDocument: {
|
||||
value: 'dGVzdCBmYWlsCg==',
|
||||
attrs: { type: 'pdf' }
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
context 'with valid user' do
|
||||
|
@ -272,7 +278,7 @@ describe 'EPP Contact', epp: true do
|
|||
end
|
||||
|
||||
def update_request(overwrites = {}, extension = {}, options = {})
|
||||
extension = @extension if extension.blank?
|
||||
extension = @update_extension if extension.blank?
|
||||
|
||||
defaults = {
|
||||
id: { value: 'asd123123er' },
|
||||
|
@ -394,7 +400,7 @@ describe 'EPP Contact', epp: true do
|
|||
@contact.reload.code.should == 'FIRST0:SH8013'
|
||||
end
|
||||
|
||||
it 'should update ident' do
|
||||
it 'should not be able to update ident' do
|
||||
extension = {
|
||||
ident: {
|
||||
value: '1990-22-12',
|
||||
|
@ -406,10 +412,11 @@ describe 'EPP Contact', epp: true do
|
|||
}
|
||||
}
|
||||
response = update_request({ id: { value: 'FIRST0:SH8013' } }, extension)
|
||||
response[:msg].should == 'Command completed successfully'
|
||||
response[:result_code].should == '1000'
|
||||
response[:msg].should ==
|
||||
'Parameter value policy error. Update of ident data not allowed [ident]'
|
||||
response[:result_code].should == '2306'
|
||||
|
||||
Contact.find_by(code: 'FIRST0:SH8013').ident_type.should == 'birthday'
|
||||
Contact.find_by(code: 'FIRST0:SH8013').ident_type.should == 'priv'
|
||||
end
|
||||
|
||||
it 'should return parameter value policy errror for org update' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue