Sha256: b0573d7da804d9a9bd66e1ab8e902a6a646f81bc66386b8550e2b49356107df5
Contents?: true
Size: 438 Bytes
Versions: 2
Compression:
Stored size: 438 Bytes
Contents
require "test_helper" class Ipv6Test < Minitest::Test let(:user) { User.new } test "is valid" do User.validates_ip_address :url, only: :v6 user.url = "FE80:0000:0000:0000:0202:B3FF:FE1E:8329" assert user.valid? end test "is invalid" do User.validates_ip_address :url, only: :v6 user.url = "192.168.1.2" refute user.valid? assert_includes user.errors[:url], "is not a valid IPv6 address" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
validators-2.8.1 | test/validators/validates_ip_address/ipv6_test.rb |
validators-2.8.0 | test/validators/validates_ip_address/ipv6_test.rb |