Handle past domains.delete_at

This commit is contained in:
Artur Beljajev 2018-07-22 23:58:25 +03:00
parent e4305e7865
commit 07bc0546bb
2 changed files with 4 additions and 3 deletions

View file

@ -20,7 +20,7 @@ class DomainDiscardableTest < ActiveSupport::TestCase
def test_discarding_a_domain_schedules_deletion_at_random_time
@domain.discard
other_domain = domains(:airport)
other_domain.delete_at = Time.zone.parse('2010-07-05 10:00')
other_domain.delete_at = Time.zone.parse('2010-07-04')
other_domain.discard
background_job = QueJob.find_by("args->>0 = '#{@domain.id}'", job_class: DomainDeleteJob.name)