diff options
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 |