diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-21 21:34:17 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-21 21:34:37 -0700 |
commit | a5eb297424f68583636b762686726bc0c84703c0 (patch) | |
tree | 50a4f35009f4c53f6898105666ab6eed6d361828 /activerecord/test/cases | |
parent | e6a66cbd056f177f7e60341799aa95791fcfa19d (diff) | |
download | rails-a5eb297424f68583636b762686726bc0c84703c0.tar.gz rails-a5eb297424f68583636b762686726bc0c84703c0.tar.bz2 rails-a5eb297424f68583636b762686726bc0c84703c0.zip |
Revert "coerce blank strings to nil values for boolean and integer fields"
This reverts commit aee14630d4dc0856e597794cc731fac68c2d2e34.
[#860 state:incomplete]
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/validations_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb index a40bda2533..4b2d28c80b 100644 --- a/activerecord/test/cases/validations_test.rb +++ b/activerecord/test/cases/validations_test.rb @@ -1420,8 +1420,8 @@ class ValidatesNumericalityTest < ActiveRecord::TestCase def test_validates_numericality_of_with_nil_allowed Topic.validates_numericality_of :approved, :allow_nil => true - invalid!(JUNK) - valid!(NIL + BLANK + FLOATS + INTEGERS + BIGDECIMAL + INFINITY) + invalid!(BLANK + JUNK) + valid!(NIL + FLOATS + INTEGERS + BIGDECIMAL + INFINITY) end def test_validates_numericality_of_with_integer_only @@ -1434,8 +1434,8 @@ class ValidatesNumericalityTest < ActiveRecord::TestCase def test_validates_numericality_of_with_integer_only_and_nil_allowed Topic.validates_numericality_of :approved, :only_integer => true, :allow_nil => true - invalid!(JUNK + FLOATS + BIGDECIMAL + INFINITY) - valid!(NIL + BLANK + INTEGERS) + invalid!(BLANK + JUNK + FLOATS + BIGDECIMAL + INFINITY) + valid!(NIL + INTEGERS) end def test_validates_numericality_with_greater_than |