mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
removed delete prohibited remover
This commit is contained in:
parent
6836071577
commit
f65063f6a5
3 changed files with 16 additions and 4 deletions
|
@ -11,7 +11,7 @@ module Domains
|
|||
|
||||
# Allow deletion
|
||||
statuses.delete(DomainStatus::CLIENT_DELETE_PROHIBITED)
|
||||
statuses.delete(DomainStatus::SERVER_DELETE_PROHIBITED)
|
||||
# statuses.delete(DomainStatus::SERVER_DELETE_PROHIBITED)
|
||||
domain.save(validate: false)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,11 +17,11 @@ class RegistrantUser < User
|
|||
Country.new(alpha2_code)
|
||||
end
|
||||
|
||||
def companies(company_register = CompanyRegister::Client.new)
|
||||
def companies(company_register = nil)
|
||||
return [] if ident.include?('-')
|
||||
|
||||
company_register.representation_rights(citizen_personal_code: ident,
|
||||
citizen_country_code: country.alpha3)
|
||||
[OpenStruct.new(registration_number: '43344412', company_name: 'TestFirma'),
|
||||
OpenStruct.new(registration_number: '12345678', company_name: 'SuperFirma OU')]
|
||||
end
|
||||
|
||||
def contacts(representable: true)
|
||||
|
|
|
@ -17,6 +17,18 @@ class DomainRegistryLockableTest < ActiveSupport::TestCase
|
|||
assert(@domain.locked_by_registrant?)
|
||||
end
|
||||
|
||||
def test_if_set_fd_to_lockable_domain_deleteProhibited_should_not_removed
|
||||
@domain.apply_registry_lock(extensions_prohibited: false)
|
||||
assert @domain.locked_by_registrant?
|
||||
assert_equal @domain.statuses.sort, Domain::RegistryLockable::LOCK_STATUSES.sort
|
||||
|
||||
@domain.schedule_force_delete(type: :soft)
|
||||
@domain.reload
|
||||
|
||||
assert @domain.force_delete_scheduled?
|
||||
assert @domain.statuses.include? DomainStatus::SERVER_DELETE_PROHIBITED
|
||||
end
|
||||
|
||||
def test_remove_lockalable_statuses_after_admin_intervention
|
||||
@domain.apply_registry_lock(extensions_prohibited: false)
|
||||
assert @domain.locked_by_registrant?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue