mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +02:00
Add condition on not having clientHold status for force-delete job
See #1480
This commit is contained in:
parent
b3e5e477ad
commit
a7b4b0d19b
4 changed files with 26 additions and 2 deletions
|
@ -38,4 +38,18 @@ class DomainCronTest < ActiveSupport::TestCase
|
|||
|
||||
assert_emails 1
|
||||
end
|
||||
|
||||
def test_does_not_sets_hold_if_already_set
|
||||
Setting.redemption_grace_period = 30
|
||||
|
||||
@domain.update(valid_to: Time.zone.parse('2012-08-05'))
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
@domain.schedule_force_delete(type: :soft)
|
||||
@domain.reload
|
||||
@domain.update(template_name: 'legal_person', statuses: [DomainStatus::CLIENT_HOLD])
|
||||
travel_to Time.zone.parse('2010-08-06')
|
||||
DomainCron.start_client_hold
|
||||
|
||||
assert_emails 0
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue