mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 10:16:01 +02:00
Added linked and ok statuses
This commit is contained in:
parent
1f7ef2254e
commit
4f417d22da
5 changed files with 79 additions and 9 deletions
|
@ -152,6 +152,28 @@ describe Contact do
|
|||
@contact.statuses.first.value.should == 'ok'
|
||||
end
|
||||
|
||||
it 'should have linked status when domain' do
|
||||
@domain_contact = Fabricate(:domain_contact, contact_type: 'admin', contact_id: @contact.id)
|
||||
@domain = Fabricate(:domain, domain_contacts: [@domain_contact])
|
||||
contact = @domain.contacts.first
|
||||
contact.save
|
||||
|
||||
contact.statuses.map(&:value).should == %w(ok linked)
|
||||
end
|
||||
|
||||
it 'should not have linked status when no domain' do
|
||||
@domain_contact = Fabricate(:domain_contact, contact_type: 'admin', contact_id: @contact.id)
|
||||
@domain = Fabricate(:domain, domain_contacts: [@domain_contact])
|
||||
contact = @domain.contacts.first
|
||||
contact.save
|
||||
|
||||
contact.statuses.map(&:value).should == %w(ok linked)
|
||||
|
||||
contact.domains.destroy_all
|
||||
contact.save
|
||||
contact.statuses.map(&:value).should == %w(ok)
|
||||
end
|
||||
|
||||
context 'as birthday' do
|
||||
before :all do
|
||||
@contact.ident_type = 'birthday'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue