diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-25 18:04:06 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-25 18:04:06 +0000 |
commit | 42775686d2b32b66c971c0560ba2497c7f8703b2 (patch) | |
tree | 61539c008bc3690abec2349d7d0c32e0567fde44 /activerecord/test | |
parent | d9125093e8caaf112312d6e59052c3f20725fad2 (diff) | |
download | rails-42775686d2b32b66c971c0560ba2497c7f8703b2.tar.gz rails-42775686d2b32b66c971c0560ba2497c7f8703b2.tar.bz2 rails-42775686d2b32b66c971c0560ba2497c7f8703b2.zip |
PostgreSQL: support microsecond time resolution. Closes #5492.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/base_test.rb | 6 | ||||
-rw-r--r-- | activerecord/test/fixtures/topics.yml | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb index 2cbc2cfd2b..15605d779a 100755 --- a/activerecord/test/base_test.rb +++ b/activerecord/test/base_test.rb @@ -315,6 +315,12 @@ class BasicsTest < Test::Unit::TestCase Time, Topic.find(1).written_on, "The written_on attribute should be of the Time class" ) + + # For adapters which support microsecond resolution. + if current_adapter?(:PostgreSQLAdapter) + assert_equal 11, Topic.find(1).written_on.sec + assert_equal 223300, Topic.find(1).written_on.usec + end end def test_destroy diff --git a/activerecord/test/fixtures/topics.yml b/activerecord/test/fixtures/topics.yml index b1e5159be2..e78c0e1b3d 100644 --- a/activerecord/test/fixtures/topics.yml +++ b/activerecord/test/fixtures/topics.yml @@ -3,7 +3,7 @@ first: title: The First Topic author_name: David author_email_address: david@loudthinking.com - written_on: 2003-07-16t15:28:00.00+01:00 + written_on: 2003-07-16t15:28:11.2233+01:00 last_read: 2004-04-15 bonus_time: 2005-01-30t15:28:00.00+01:00 content: Have a nice day |