[Bast-commits] r6777 - DBIx-Class/0.08/branches/on_connect_call/t
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Tue Jun 23 23:36:12 GMT 2009
Author: caelum
Date: 2009-06-23 23:36:12 +0000 (Tue, 23 Jun 2009)
New Revision: 6777
Modified:
DBIx-Class/0.08/branches/on_connect_call/t/73oracle_inflate.t
Log:
properly test nanosecond precision with oracle and datetime_setup
Modified: DBIx-Class/0.08/branches/on_connect_call/t/73oracle_inflate.t
===================================================================
--- DBIx-Class/0.08/branches/on_connect_call/t/73oracle_inflate.t 2009-06-23 19:34:12 UTC (rev 6776)
+++ DBIx-Class/0.08/branches/on_connect_call/t/73oracle_inflate.t 2009-06-23 23:36:12 UTC (rev 6777)
@@ -17,7 +17,7 @@
plan skip_all => 'needs DateTime and DateTime::Format::Oracle for testing';
}
else {
- plan tests => 9;
+ plan tests => 10;
}
}
@@ -81,7 +81,7 @@
$dt = DateTime->now();
my $timestamp = $dt->clone;
-$timestamp->millisecond( 80 );
+$timestamp->set_nanosecond( int 500_000_000 );
$track = $schema->resultset('Track')->find( 1 );
$track->update({ last_updated_on => $dt, last_updated_at => $timestamp });
@@ -91,6 +91,9 @@
is( $track->last_updated_on, $dt, 'DateTime round-trip as DATE' );
is( $track->last_updated_at, $timestamp, 'DateTime round-trip as TIMESTAMP' );
+is( int $track->last_updated_at->nanosecond, int 500_000_000,
+ 'TIMESTAMP nanoseconds survived' );
+
# clean up our mess
END {
if($schema && ($dbh = $schema->storage->dbh)) {
More information about the Bast-commits
mailing list