mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
Fix contact archivation tests
This commit is contained in:
parent
3c7756680d
commit
7a24eab63a
2 changed files with 2 additions and 3 deletions
|
@ -265,9 +265,8 @@ class ContactTest < ActiveSupport::TestCase
|
|||
|
||||
def test_unlinked_scope_skips_contact_that_is_linked_as_registrant
|
||||
contact = unlinked_contact
|
||||
domains(:shop).update_columns(registrant_id: contact.becomes(Registrant))
|
||||
domains(:shop).update_columns(registrant_id: contact.becomes(Registrant).id)
|
||||
|
||||
reload
|
||||
assert Contact.unlinked.exclude?(contact), 'Contact should be excluded'
|
||||
end
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class ArchiveContactsTaskTest < ActiveSupport::TestCase
|
|||
|
||||
def eliminate_effect_of_all_contacts_except(contact)
|
||||
Contact.connection.disable_referential_integrity do
|
||||
Contact.delete_all("id != #{contact.id}")
|
||||
Contact.where("id != #{contact.id}").delete_all
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue