Delete original WhoisRecord after domain deletion

This commit is contained in:
Alex Sherman 2021-01-05 17:21:13 +05:00
parent 0c5ef72c7d
commit b60a7e571f
3 changed files with 16 additions and 12 deletions

View file

@ -63,11 +63,15 @@ class DomainReleasableAuctionableTest < ActiveSupport::TestCase
def test_updates_whois_server
@domain.update!(delete_date: '2010-07-04')
travel_to Time.zone.parse('2010-07-05')
old_whois = @domain.whois_record
Domain.release_domains
whois_record = Whois::Record.find_by(name: @domain.name)
assert_raises ActiveRecord::RecordNotFound do
old_whois.reload
end
whois_record = Whois::Record.find_by(name: @domain.name)
json = { "name"=>@domain.name,
"status"=>["AtAuction"],
"disclaimer"=> Setting.registry_whois_disclaimer }