FIX: show ip address with mask again on /admin/logs/screened_ip_addresses

This commit is contained in:
Neil Lalonde
2014-02-18 10:33:08 -05:00
parent 38004fc218
commit 6c23a1903e
3 changed files with 30 additions and 1 deletions

View File

@ -33,6 +33,20 @@ describe ScreenedIpAddress do
end
end
describe "ip_address_with_mask" do
it "returns nil when ip_address is nil" do
described_class.new.ip_address_with_mask.should be_nil
end
it "returns ip_address without mask if there is no mask" do
described_class.new(ip_address: "123.123.23.22").ip_address_with_mask.should == "123.123.23.22"
end
it "returns ip_address with mask" do
described_class.new(ip_address: "123.12.0.0/16").ip_address_with_mask.should == "123.12.0.0/16"
end
end
describe '#watch' do
context 'ip_address is not being watched' do
it 'should create a new record' do