From cd2596f55e88fe659592612a793c4f4aa723c9be Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 1 Dec 2014 16:07:57 +0100 Subject: [PATCH] tests, use public API to verify default parsing. #17863, #17856 --- activerecord/test/cases/defaults_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/activerecord/test/cases/defaults_test.rb b/activerecord/test/cases/defaults_test.rb index 3e6032e266..d035892bb9 100644 --- a/activerecord/test/cases/defaults_test.rb +++ b/activerecord/test/cases/defaults_test.rb @@ -38,7 +38,8 @@ class DefaultTest < ActiveRecord::TestCase end def test_default_negative_integer - assert_equal "-1", Default.columns_hash['negative_integer'].default + assert_equal -1, Default.new.negative_integer + assert_equal "-1", Default.new.negative_integer_before_type_cast end end end