Sha256: 7583e488142c6c814338d90ef85075f45d21acafb2ef023a9e3984a1efb23efb
Contents?: true
Size: 469 Bytes
Versions: 14
Compression:
Stored size: 469 Bytes
Contents
# frozen_string_literal: true 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
14 entries across 14 versions & 1 rubygems