mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
Merge pull request #1765 from internetee/fix-epp-domain-status-missing-error
EPP: Show error when trying to remove unassigned domain status
This commit is contained in:
commit
23d77ebccf
2 changed files with 26 additions and 2 deletions
|
@ -417,7 +417,7 @@ class Epp::Domain < Domain
|
|||
if statuses.include?(x)
|
||||
to_destroy << x
|
||||
else
|
||||
add_epp_error('2303', 'status', x, [:domain_statuses, :not_found])
|
||||
add_epp_error('2303', 'status', x, %i[statuses not_found])
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -432,7 +432,7 @@ class Epp::Domain < Domain
|
|||
|
||||
frame.css('status').each do |x|
|
||||
unless DomainStatus::CLIENT_STATUSES.include?(x['s'])
|
||||
add_epp_error('2303', 'status', x['s'], [:domain_statuses, :not_found])
|
||||
add_epp_error('2303', 'status', x['s'], %i[statuses not_found])
|
||||
next
|
||||
end
|
||||
|
||||
|
|
|
@ -503,6 +503,30 @@ class EppDomainUpdateBaseTest < EppTestCase
|
|||
assert_not_includes(@domain.statuses, DomainStatus::CLIENT_HOLD)
|
||||
end
|
||||
|
||||
def test_update_domain_returns_error_when_removing_unassigned_status
|
||||
assert_not_includes(@domain.statuses, DomainStatus::CLIENT_HOLD)
|
||||
request_xml = <<-XML
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
|
||||
<command>
|
||||
<update>
|
||||
<domain:update xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
|
||||
<domain:name>#{@domain.name}</domain:name>
|
||||
<domain:rem>
|
||||
<domain:status s="clientHold"/>
|
||||
</domain:rem>
|
||||
</domain:update>
|
||||
</update>
|
||||
</command>
|
||||
</epp>
|
||||
XML
|
||||
|
||||
post epp_update_path, params: { frame: request_xml },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
@domain.reload
|
||||
assert_epp_response :object_does_not_exist
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def assert_verification_and_notification_emails
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue