mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 13:36:15 +02:00
fix: update admin contact validation error code
- Change error code from 2004 to 2306 for admin contact validation - Add explicit validation check for required admin contacts - Update tests to expect new error code The error code 2306 better reflects the EPP standard for policy-based validation failures. This change makes the error handling more consistent with EPP specifications when validating admin contact requirements.
This commit is contained in:
parent
dc37223bc2
commit
a56237c84f
2 changed files with 10 additions and 4 deletions
|
@ -142,7 +142,7 @@ class ReppV1DomainsContactsTest < ActionDispatch::IntegrationTest
|
|||
|
||||
@domain.reload
|
||||
assert_response :bad_request
|
||||
assert_equal 2004, json[:code]
|
||||
assert_equal 2306, json[:code]
|
||||
|
||||
assert @domain.admin_contacts.any?
|
||||
end
|
||||
|
@ -159,7 +159,7 @@ class ReppV1DomainsContactsTest < ActionDispatch::IntegrationTest
|
|||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :bad_request
|
||||
assert_equal 2004, json[:code]
|
||||
assert_equal 2306, json[:code]
|
||||
assert @domain.admin_contacts.any?
|
||||
end
|
||||
|
||||
|
@ -178,7 +178,7 @@ class ReppV1DomainsContactsTest < ActionDispatch::IntegrationTest
|
|||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :bad_request
|
||||
assert_equal 2004, json[:code]
|
||||
assert_equal 2306, json[:code]
|
||||
assert @domain.admin_contacts.any?
|
||||
end
|
||||
|
||||
|
@ -217,7 +217,7 @@ class ReppV1DomainsContactsTest < ActionDispatch::IntegrationTest
|
|||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :bad_request
|
||||
assert_equal 2004, json[:code]
|
||||
assert_equal 2306, json[:code]
|
||||
assert @domain.admin_contacts.any?
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue