Fix error code/message

This commit is contained in:
Alex Sherman 2021-04-28 14:02:31 +05:00
parent 0f58e47513
commit c52c669339
3 changed files with 6 additions and 6 deletions

View file

@ -21,7 +21,7 @@ class LegalDocument < ApplicationRecord
def epp_code_map def epp_code_map
{ {
'2306' => [ '2308' => [
%i[body length_more_than], %i[body length_more_than],
%i[body length_less_than], %i[body length_less_than],
] ]

View file

@ -138,8 +138,8 @@ en:
legal_document: legal_document:
attributes: attributes:
body: body:
length_more_than: 'Parameter value policy error: legalDocument size should be more than 3kB' length_more_than: 'Parameter value policy error: Legaldoc size is less than minimum allowed size of 3kB'
length_less_than: 'Parameter value policy error: legalDocument size should be less than 8mB' length_less_than: 'Parameter value policy error: Legaldoc size exceeds maximum allowed size of 8mB'
attributes: attributes:

View file

@ -74,7 +74,7 @@ class EppDomainCreateBaseTest < EppTestCase
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' } headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end end
assert_epp_response :parameter_value_policy_error assert_epp_response :data_management_policy_violation
end end
def test_too_big_legal_document def test_too_big_legal_document
@ -108,8 +108,8 @@ class EppDomainCreateBaseTest < EppTestCase
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' } headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end end
assert_epp_response :parameter_value_policy_error assert_epp_response :data_management_policy_violation
error_description = 'legalDocument size should be less than 8mB' error_description = 'Legaldoc size exceeds maximum allowed size of 8mB'
assert response.body.include? error_description assert response.body.include? error_description
end end