Add test for clear force delete on registrar change

This commit is contained in:
Alex Sherman 2020-01-15 17:46:31 +05:00
parent c252d801f9
commit e7581246d6
5 changed files with 43 additions and 3 deletions

View file

@ -23,4 +23,19 @@ class DomainCronTest < ActiveSupport::TestCase
assert_emails 1
end
end
def test_client_hold
Setting.redemption_grace_period = 30
@domain.update(valid_to: Time.zone.parse('2012-08-05'))
assert_not @domain.force_delete_scheduled?
travel_to Time.zone.parse('2010-07-05')
@domain.schedule_force_delete(type: :soft)
@domain.reload
@domain.update(template_name: 'legal_person')
travel_to Time.zone.parse('2010-08-06')
DomainCron.start_client_hold
assert_emails 1
end
end