mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
Fix tests
This commit is contained in:
parent
f2a1ee101b
commit
220e0d7993
6 changed files with 29 additions and 31 deletions
|
@ -16,12 +16,15 @@ module Repp
|
|||
end
|
||||
|
||||
def update
|
||||
@epp_errors << { code: '2304', msg: 'New contact must be valid' } if @new_contact.invalid?
|
||||
@epp_errors ||= []
|
||||
@epp_errors << { code: 2304, msg: 'New contact must be valid' } if @new_contact.invalid?
|
||||
|
||||
if @new_contact == @current_contact
|
||||
@epp_errors << { code: '2304', msg: 'New contact must be different from current' }
|
||||
@epp_errors << { code: 2304, msg: 'New contact must be different from current' }
|
||||
end
|
||||
|
||||
return handle_errors if @epp_errors.any?
|
||||
|
||||
affected, skipped = TechDomainContact.replace(@current_contact, @new_contact)
|
||||
data = { affected_domains: affected, skipped_domains: skipped }
|
||||
render_success(data: data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue