aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/validations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/validations_test.rb')
-rwxr-xr-xactiverecord/test/validations_test.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/test/validations_test.rb b/activerecord/test/validations_test.rb
index b6c9cfed7d..8949206706 100755
--- a/activerecord/test/validations_test.rb
+++ b/activerecord/test/validations_test.rb
@@ -348,4 +348,11 @@ class ValidationsTest < Test::Unit::TestCase
assert_equal "hoo 5", t.errors["title"]
end
-end
+
+ def test_throw_away_typing
+ d = Developer.create "name" => "David", "salary" => "100,000"
+ assert !d.valid?
+ assert_not_equal "100,000", d.salary
+ assert_equal "100,000", d.salary_before_type_cast
+ end
+end \ No newline at end of file