Project

General

Profile

« Previous | Next » 

Revision 7a900b06

Added by Ohad Levy over 12 years ago

  • ID 7a900b06d82455293e7a7e6de0aeac2941c70fed

fixes #1421 - expose subnet ranges for automatic IP address allocations

View differences:

test/unit/subnet_test.rb
assert record.valid?
end
end
test "from cant be bigger than to range" do
s = subnets(:one)
s.to = "2.3.4.15"
s.from = "2.3.4.17"
assert !s.save
end
test "should be able to save ranges" do
s=subnets(:one)
s.from = "2.3.4.15"
s.to = "2.3.4.17"
assert s.save
end
test "should not be able to save ranges if they dont belong to the subnet" do
s=subnets(:one)
s.from = "2.3.3.15"
s.to = "2.3.4.17"
assert !s.save
end
test "should not be able to save ranges if one of them is missing" do
s=subnets(:one)
s.from = "2.3.4.15"
assert !s.save
s.to = "2.3.4.17"
assert s.save
end
end

Also available in: Unified diff