aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/column_test.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-05-20 14:07:58 -0700
committerSean Griffin <sean@thoughtbot.com>2014-05-20 14:07:58 -0700
commit8f387995054d9ce79522da8ef65fba28c6ea0785 (patch)
tree53d38918ff2ccbb11dd503d56108e21df031646c /activerecord/test/cases/column_test.rb
parent25c672637206a2c48fd829c58596c788b6e31c5d (diff)
downloadrails-8f387995054d9ce79522da8ef65fba28c6ea0785.tar.gz
rails-8f387995054d9ce79522da8ef65fba28c6ea0785.tar.bz2
rails-8f387995054d9ce79522da8ef65fba28c6ea0785.zip
Inline typecasting helpers from Column to the appropriate types
Diffstat (limited to 'activerecord/test/cases/column_test.rb')
-rw-r--r--activerecord/test/cases/column_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/cases/column_test.rb b/activerecord/test/cases/column_test.rb
index 15c23ea61d..3257f5bed8 100644
--- a/activerecord/test/cases/column_test.rb
+++ b/activerecord/test/cases/column_test.rb
@@ -139,7 +139,8 @@ module ActiveRecord
def test_string_to_time_with_timezone
[:utc, :local].each do |zone|
with_timezone_config default: zone do
- assert_equal Time.utc(2013, 9, 4, 0, 0, 0), Column.string_to_time("Wed, 04 Sep 2013 03:00:00 EAT")
+ column = Column.new("field", nil, Type::DateTime.new)
+ assert_equal Time.utc(2013, 9, 4, 0, 0, 0), column.type_cast("Wed, 04 Sep 2013 03:00:00 EAT")
end
end
end