mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 15:14:47 +02:00
Fix CC issues
This commit is contained in:
parent
5c7e07dbb5
commit
a5b59f20ab
2 changed files with 2 additions and 12 deletions
|
@ -31,7 +31,8 @@ module Concerns
|
||||||
def notify_registrar_about_archivation
|
def notify_registrar_about_archivation
|
||||||
registrar.notifications.create!(
|
registrar.notifications.create!(
|
||||||
text: I18n.t('contact_has_been_archived',
|
text: I18n.t('contact_has_been_archived',
|
||||||
contact_code: code, orphan_months: Setting.orphans_contacts_in_months))
|
contact_code: code, orphan_months: Setting.orphans_contacts_in_months)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def inactive?
|
def inactive?
|
||||||
|
|
|
@ -9,17 +9,6 @@ class ArchiveContactsTaskTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_output
|
|
||||||
contact = archivable_contact
|
|
||||||
eliminate_effect_of_all_contacts_except(contact)
|
|
||||||
|
|
||||||
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 }
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def archivable_contact
|
def archivable_contact
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue