aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/base_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/base_test.rb')
-rwxr-xr-xactiverecord/test/base_test.rb6
1 files changed, 6 insertions, 0 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