mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 13:06:18 +02:00
Resolve some minor CC issues
This commit is contained in:
parent
e9f28a6d14
commit
3c7756680d
9 changed files with 11 additions and 15 deletions
|
@ -20,6 +20,7 @@ module Concerns
|
||||||
|
|
||||||
def archive
|
def archive
|
||||||
raise 'Contact cannot be archived' unless archivable?
|
raise 'Contact cannot be archived' unless archivable?
|
||||||
|
|
||||||
destroy!
|
destroy!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -240,8 +240,6 @@ class Contact < ApplicationRecord
|
||||||
contacts.id)')
|
contacts.id)')
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def registrant_user_company_contacts(registrant_user)
|
def registrant_user_company_contacts(registrant_user)
|
||||||
ident = registrant_user.companies.collect(&:registration_number)
|
ident = registrant_user.companies.collect(&:registration_number)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
class ChangeLogDomainsChildrenTypeToJsonb < ActiveRecord::Migration
|
|
||||||
def change
|
|
||||||
change_column :log_domains, :children, 'jsonb USING children::jsonb'
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -4848,4 +4848,5 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||||
('20200807110611'),
|
('20200807110611'),
|
||||||
('20200811074839'),
|
('20200811074839'),
|
||||||
('20200812090409'),
|
('20200812090409'),
|
||||||
('20200812125810');
|
('20200812125810'),
|
||||||
|
('20200902131603');
|
||||||
|
|
|
@ -67,7 +67,7 @@ class ArchivableContactTest < ActiveSupport::TestCase
|
||||||
|
|
||||||
other_contact = contacts(:william)
|
other_contact = contacts(:william)
|
||||||
assert_not_equal other_contact, contact
|
assert_not_equal other_contact, contact
|
||||||
Domain.update_all(registrant_id: other_contact)
|
Domain.update_all(registrant_id: other_contact.id)
|
||||||
|
|
||||||
DomainContact.delete_all
|
DomainContact.delete_all
|
||||||
|
|
||||||
|
|
|
@ -267,6 +267,7 @@ class ContactTest < ActiveSupport::TestCase
|
||||||
contact = unlinked_contact
|
contact = unlinked_contact
|
||||||
domains(:shop).update_columns(registrant_id: contact.becomes(Registrant))
|
domains(:shop).update_columns(registrant_id: contact.becomes(Registrant))
|
||||||
|
|
||||||
|
reload
|
||||||
assert Contact.unlinked.exclude?(contact), 'Contact should be excluded'
|
assert Contact.unlinked.exclude?(contact), 'Contact should be excluded'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class ArchiveContactsTaskTest < ActiveSupport::TestCase
|
||||||
|
|
||||||
other_contact = contacts(:william)
|
other_contact = contacts(:william)
|
||||||
assert_not_equal other_contact, contact
|
assert_not_equal other_contact, contact
|
||||||
Domain.update_all(registrant_id: other_contact)
|
Domain.update_all(registrant_id: other_contact.id)
|
||||||
|
|
||||||
DomainContact.delete_all
|
DomainContact.delete_all
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue