aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/base_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-06-25 18:04:06 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-06-25 18:04:06 +0000
commit42775686d2b32b66c971c0560ba2497c7f8703b2 (patch)
tree61539c008bc3690abec2349d7d0c32e0567fde44 /activerecord/test/base_test.rb
parentd9125093e8caaf112312d6e59052c3f20725fad2 (diff)
downloadrails-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/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