mirror of
https://github.com/internetee/registry.git
synced 2025-06-15 00:54:47 +02:00
Fix test to have file at Base64, fix size validation
This commit is contained in:
parent
31a463c587
commit
0f58e47513
4 changed files with 15 additions and 11 deletions
|
@ -62,17 +62,13 @@ module Epp
|
|||
return if %w[hello error].include?(params[:action])
|
||||
schema.validate(params[:nokogiri_frame]).each do |error|
|
||||
epp_errors << {
|
||||
code: error_code(error),
|
||||
code: 2001,
|
||||
msg: error
|
||||
}
|
||||
end
|
||||
handle_errors and return if epp_errors.any?
|
||||
end
|
||||
|
||||
def error_code(error)
|
||||
error.str1.present? && error.str1.size > LegalDocument::MAX_BODY_SIZE ? 2306 : 2001
|
||||
end
|
||||
|
||||
def schema
|
||||
EPP_ALL_SCHEMA
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue