mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
added dedicated registrant model
This commit is contained in:
parent
2ed9672eb5
commit
321e28b8c7
10 changed files with 40 additions and 14 deletions
|
@ -318,13 +318,13 @@ describe Contact, '.destroy_orphans' do
|
|||
end
|
||||
|
||||
it 'should find one orphan' do
|
||||
Fabricate(:domain, registrant: @contact_1)
|
||||
Fabricate(:domain, registrant: Registrant.find(@contact_1.id))
|
||||
Contact.find_orphans.count.should == 1
|
||||
Contact.find_orphans.last.should == @contact_2
|
||||
end
|
||||
|
||||
it 'should find no orphans' do
|
||||
Fabricate(:domain, registrant: @contact_1, admin_contacts: [@contact_2])
|
||||
Fabricate(:domain, registrant: Registrant.find(@contact_1.id), admin_contacts: [@contact_2])
|
||||
cc = Contact.count
|
||||
Contact.find_orphans.count.should == 0
|
||||
Contact.destroy_orphans
|
||||
|
|
|
@ -65,7 +65,7 @@ describe WhoisRecord do
|
|||
name: 'First Registrar Ltd',
|
||||
created_at: Time.zone.parse('1995.01.01'),
|
||||
updated_at: Time.zone.parse('1996.01.01'))
|
||||
@domain.registrant = Fabricate(:contact,
|
||||
@domain.registrant = Fabricate(:registrant,
|
||||
name: 'Jarren Jakubowski0',
|
||||
created_at: Time.zone.parse('2005.01.01'))
|
||||
@domain.admin_contacts = [Fabricate(:contact,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue