validators 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e2c068d28878c6cd22e62c6842ed48300e66edf545693b97e08fb6e8ed01d53
|
4
|
+
data.tar.gz: 95b90e034d61f65ceb1a1538f906266f882b35d2ca8438b5186ea5caba2f9b6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d85e1a89b5b106d7b1e69809f7a314f001ada7e68416a74d8a08a3875bacd55c6634d02792ac53fe418c63a41253ea3787f2ff5bc257309c01c1cdbb07c07bcf
|
7
|
+
data.tar.gz: a12a716b4960cf40fd37f23ff0d049fe2c5efca3dc310c65c96e24d0a5c714c54c7426cb8170ce7ba45023d6367714833e61462db5c97bc6751774b946194d3e
|
data/lib/validators/version.rb
CHANGED
@@ -3,6 +3,18 @@
|
|
3
3
|
require "test_helper"
|
4
4
|
|
5
5
|
class ValidatesSubdomainTest < Minitest::Test
|
6
|
+
test "don't explode with nil values" do
|
7
|
+
model = build_model do
|
8
|
+
attr_accessor :subdomain
|
9
|
+
validates_subdomain :subdomain
|
10
|
+
end
|
11
|
+
|
12
|
+
instance = model.new(subdomain: nil)
|
13
|
+
|
14
|
+
refute instance.valid?
|
15
|
+
assert_includes instance.errors[:subdomain], "is invalid"
|
16
|
+
end
|
17
|
+
|
6
18
|
test "rejects invalid subdomain" do
|
7
19
|
model = build_model do
|
8
20
|
attr_accessor :subdomain
|