Fix test to have file at Base64, fix size validation

This commit is contained in:
Alex Sherman 2021-03-19 15:35:55 +05:00
parent 31a463c587
commit 0f58e47513
4 changed files with 15 additions and 11 deletions

View file

@ -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