Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/interactions/actions/domain_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def call
# domain.attach_default_contacts
assign_expiry_time
maybe_attach_legal_doc
maybe_validate_phone_number

commit
end
Expand Down Expand Up @@ -210,5 +211,9 @@ def validation_process_errored?
def current_registrar
Registrar.find(params[:registrar])
end

def maybe_validate_phone_number
OrgRegistrantPhoneCheckerJob.perform_later(type: 'single', registrant_user_code: domain.registrant.code)
end
end
end
5 changes: 5 additions & 0 deletions app/interactions/actions/domain_transfer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def run_validations
validate_registrar
validate_eligilibty
validate_not_discarded
maybe_validate_phone_number
end

def valid_transfer_code?
Expand Down Expand Up @@ -66,5 +67,9 @@ def commit
bare_domain = Domain.find(domain.id)
::DomainTransfer.request(bare_domain, user)
end

def maybe_validate_phone_number
OrgRegistrantPhoneCheckerJob.perform_later(type: 'single', registrant_user_code: domain.registrant.code)
end
end
end
5 changes: 5 additions & 0 deletions app/interactions/actions/domain_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def call
::Actions::BaseAction.maybe_attach_legal_doc(domain, params[:legal_document])

ask_registrant_verification
maybe_validate_phone_number

commit
end
Expand Down Expand Up @@ -298,5 +299,9 @@ def any_errors?
def true?(obj)
obj.to_s.downcase == 'true'
end

def maybe_validate_phone_number
OrgRegistrantPhoneCheckerJob.perform_later(type: 'single', registrant_user_code: domain.registrant.code)
end
end
end
6 changes: 3 additions & 3 deletions test/integration/epp/domain/update/base_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def test_requires_verification_from_current_registrant_when_provided_registrant_
XML

assert_no_enqueued_jobs
assert_enqueued_jobs 3 do
assert_enqueued_jobs 4 do
post epp_update_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
Expand Down Expand Up @@ -387,7 +387,7 @@ def test_requires_verification_from_current_registrant_when_not_yet_verified_by_
XML

assert_no_enqueued_jobs
assert_enqueued_jobs 3 do
assert_enqueued_jobs 4 do
post epp_update_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
Expand Down Expand Up @@ -427,7 +427,7 @@ def test_updates_registrant_when_legaldoc_is_not_mandatory
XML

assert_no_enqueued_jobs
assert_enqueued_jobs 3 do
assert_enqueued_jobs 4 do
post epp_update_path, params: { frame: request_xml },
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
end
Expand Down
Loading