contacts:archive: delete orphaned once it's discovered / allow to start query from specific contact_id

This commit is contained in:
Karl Erik Õunapuu 2020-09-04 11:24:00 +03:00
parent bbbb3d5367
commit fa6ebd9cda
No known key found for this signature in database
GPG key ID: C9DD647298A34764
2 changed files with 23 additions and 5 deletions

View file

@ -13,7 +13,8 @@ class ArchiveContactsTaskTest < ActiveSupport::TestCase
contact = archivable_contact
eliminate_effect_of_all_contacts_except(contact)
expected_output = "Found archivable contact id(#{contact.id}), code (#{contact.code})\n" \
expected_output = "Found 1 unlinked contacts. Starting to archive.\n" \
"Found archivable contact id(#{contact.id}), code (#{contact.code})\n" \
"Archiving contact: id(#{contact.id}), code(#{contact.code})\n" \
"Archived total: 1\n"
assert_output(expected_output) { run_task }