mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Type test for #39 ticket: Registrant confirmation should not be asked if new object has identical ident data
This commit is contained in:
parent
91a0b5e2a6
commit
63c8db4cf6
1 changed files with 44 additions and 0 deletions
|
@ -5,6 +5,7 @@ class EppDomainUpdateBaseTest < EppTestCase
|
||||||
|
|
||||||
setup do
|
setup do
|
||||||
@domain = domains(:shop)
|
@domain = domains(:shop)
|
||||||
|
@contact = contacts(:john)
|
||||||
@original_registrant_change_verification =
|
@original_registrant_change_verification =
|
||||||
Setting.request_confirmation_on_registrant_change_enabled
|
Setting.request_confirmation_on_registrant_change_enabled
|
||||||
ActionMailer::Base.deliveries.clear
|
ActionMailer::Base.deliveries.clear
|
||||||
|
@ -225,6 +226,49 @@ class EppDomainUpdateBaseTest < EppTestCase
|
||||||
Setting.legal_document_is_mandatory = old_value
|
Setting.legal_document_is_mandatory = old_value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# ================================================================
|
||||||
|
def test_domain_should_not_padding_if_registrant_update_with_same_ident
|
||||||
|
Setting.request_confirmation_on_registrant_change_enabled = true
|
||||||
|
|
||||||
|
current = @domain.registrant
|
||||||
|
new_registrant = contacts(:william)
|
||||||
|
new_registrant.update(
|
||||||
|
ident: current.ident,
|
||||||
|
ident_type: current.ident_type,
|
||||||
|
ident_country_code: current.ident_country_code
|
||||||
|
)
|
||||||
|
|
||||||
|
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:chg>
|
||||||
|
<domain:registrant>#{new_registrant.code}</domain:registrant>
|
||||||
|
</domain:chg>
|
||||||
|
</domain:update>
|
||||||
|
</update>
|
||||||
|
<extension>
|
||||||
|
<eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
|
||||||
|
<eis:legalDocument type="pdf">#{'test' * 2000}</eis:legalDocument>
|
||||||
|
</eis:extdata>
|
||||||
|
</extension>
|
||||||
|
</command>
|
||||||
|
</epp>
|
||||||
|
XML
|
||||||
|
|
||||||
|
post epp_update_path, params: { frame: request_xml },
|
||||||
|
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||||
|
@domain.reload
|
||||||
|
|
||||||
|
# NOTE: completed_successfully_action_pending
|
||||||
|
assert_epp_response :completed_successfully
|
||||||
|
refute_includes @domain.statuses, DomainStatus::PENDING_UPDATE
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
def test_skips_verification_when_provided_registrant_is_the_same_as_current_one
|
def test_skips_verification_when_provided_registrant_is_the_same_as_current_one
|
||||||
Setting.request_confirmation_on_registrant_change_enabled = true
|
Setting.request_confirmation_on_registrant_change_enabled = true
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue