mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 02:05:57 +02:00
Show only priv contacts
This commit is contained in:
parent
e20de5b793
commit
2ed9672eb5
8 changed files with 28 additions and 3 deletions
|
@ -24,7 +24,6 @@ describe ApiUser do
|
|||
it 'should be active by default' do
|
||||
@api_user.active.should == true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'with valid attributes' do
|
||||
|
|
|
@ -39,6 +39,10 @@ describe Registrar do
|
|||
@registrar.reference_no.should_not be_blank
|
||||
@registrar.reference_no.last(10).to_i.should_not == 0
|
||||
end
|
||||
|
||||
it 'should not have priv contacts' do
|
||||
@registrar.priv_contacts.size.should == 0
|
||||
end
|
||||
end
|
||||
|
||||
context 'with valid attributes' do
|
||||
|
@ -126,5 +130,14 @@ describe Registrar do
|
|||
registrar.valid?
|
||||
registrar.errors.full_messages.should == ['Code is forbidden to use']
|
||||
end
|
||||
|
||||
it 'should have priv contacts' do
|
||||
Fabricate(:contact, registrar: @registrar)
|
||||
@registrar.reload.priv_contacts.size.should == 1
|
||||
end
|
||||
|
||||
it 'should not have priv contacts' do
|
||||
@registrar.priv_contacts.size.should == 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue