mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 16:53:37 +02:00
Add logging to white ip
This commit is contained in:
parent
8e37355e13
commit
76ea1389e6
7 changed files with 73 additions and 27 deletions
|
@ -25,30 +25,30 @@ describe WhiteIp do
|
|||
end
|
||||
end
|
||||
|
||||
# context 'with valid attributes' do
|
||||
# before :all do
|
||||
# @white_ip = Fabricate(:white_ip)
|
||||
# end
|
||||
context 'with valid attributes' do
|
||||
before :all do
|
||||
@white_ip = Fabricate(:white_ip)
|
||||
end
|
||||
|
||||
# it 'should be valid' do
|
||||
# @white_ip.valid?
|
||||
# @white_ip.errors.full_messages.should match_array([])
|
||||
# end
|
||||
it 'should be valid' do
|
||||
@white_ip.valid?
|
||||
@white_ip.errors.full_messages.should match_array([])
|
||||
end
|
||||
|
||||
# it 'should be valid twice' do
|
||||
# @white_ip = Fabricate(:white_ip)
|
||||
# @white_ip.valid?
|
||||
# @white_ip.errors.full_messages.should match_array([])
|
||||
# end
|
||||
it 'should be valid twice' do
|
||||
@white_ip = Fabricate(:white_ip)
|
||||
@white_ip.valid?
|
||||
@white_ip.errors.full_messages.should match_array([])
|
||||
end
|
||||
|
||||
# it 'should have one version' do
|
||||
# with_versioning do
|
||||
# @white_ip.versions.should == []
|
||||
# @white_ip.ipv4 = '192.168.1.1'
|
||||
# @white_ip.save
|
||||
# @white_ip.errors.full_messages.should match_array([])
|
||||
# @white_ip.versions.size.should == 1
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
it 'should have one version' do
|
||||
with_versioning do
|
||||
@white_ip.versions.should == []
|
||||
@white_ip.ipv4 = '192.168.1.2'
|
||||
@white_ip.save
|
||||
@white_ip.errors.full_messages.should match_array([])
|
||||
@white_ip.versions.size.should == 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue