diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-05-17 07:58:26 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-05-17 07:58:26 -0700 |
commit | 5371242384171dc0255716e31e9257ddeec17d10 (patch) | |
tree | d1af041137cee54ff6fc6dd9b7269c7635db644d /activemodel/test | |
parent | c2fb8afaa0e6a8f3d1782c97790a4bea8d4f0b0b (diff) | |
download | rails-5371242384171dc0255716e31e9257ddeec17d10.tar.gz rails-5371242384171dc0255716e31e9257ddeec17d10.tar.bz2 rails-5371242384171dc0255716e31e9257ddeec17d10.zip |
Valid hex strings aren't valid float column values, to match the integer restriction. [#4622 state:resolved]
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/validations/numericality_validation_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/test/cases/validations/numericality_validation_test.rb b/activemodel/test/cases/validations/numericality_validation_test.rb index be620c53fa..963ad6450b 100644 --- a/activemodel/test/cases/validations/numericality_validation_test.rb +++ b/activemodel/test/cases/validations/numericality_validation_test.rb @@ -18,7 +18,7 @@ class NumericalityValidationTest < ActiveModel::TestCase FLOATS = [0.0, 10.0, 10.5, -10.5, -0.0001] + FLOAT_STRINGS INTEGERS = [0, 10, -10] + INTEGER_STRINGS BIGDECIMAL = BIGDECIMAL_STRINGS.collect! { |bd| BigDecimal.new(bd) } - JUNK = ["not a number", "42 not a number", "0xdeadbeef", "00-1", "--3", "+-3", "+3-1", "-+019.0", "12.12.13.12", "123\nnot a number"] + JUNK = ["not a number", "42 not a number", "0xdeadbeef", "0xinvalidhex", "00-1", "--3", "+-3", "+3-1", "-+019.0", "12.12.13.12", "123\nnot a number"] INFINITY = [1.0/0.0] def test_default_validates_numericality_of |