added clear json history method, added failed tests for force delete

This commit is contained in:
Oleg Hasjanov 2021-04-05 18:04:29 +03:00
parent 9bfdb0fb39
commit b2cfc90f4f
3 changed files with 39 additions and 0 deletions

View file

@ -41,6 +41,7 @@ module Domain::RegistryLockable
delete_domain_statuses_which_not_declared_before domain_status
end
self.locked_by_registrant_at = nil
clear_locked_domain_statuses_history
alert_registrar_lock_changes!(lock: false)
save!
@ -68,4 +69,8 @@ module Domain::RegistryLockable
def delete_domain_statuses_which_not_declared_before(domain_status)
statuses.delete(domain_status) unless locked_domain_statuses_history.include? domain_status
end
def clear_locked_domain_statuses_history
self.locked_domain_statuses_history = nil
end
end