Author: turnstep
Date: Thu Jan 10 12:44:06 2008
New Revision: 10509

Modified:
   DBD-Pg/trunk/t/03dbmethod.t

Log:
Test raw arg to last_insert_id sequence name slot.


Modified: DBD-Pg/trunk/t/03dbmethod.t
==============================================================================
--- DBD-Pg/trunk/t/03dbmethod.t (original)
+++ DBD-Pg/trunk/t/03dbmethod.t Thu Jan 10 12:44:06 2008
@@ -17,7 +17,7 @@
 $|=1;
 
 if (defined $ENV{DBI_DSN}) {
-       plan tests => 206;
+       plan tests => 208;
 }
 else {
        plan skip_all => 'Cannot run test unless DBI_DSN is defined. See the 
README file';
@@ -85,6 +85,12 @@
 like( $result, qr{^\d+$}, 'DB handle method "last_insert_id" returns a numeric 
value');
 
 eval {
+       $result = 
$dbh->last_insert_id(undef,undef,'dbd_pg_nonexistenttable_test',undef, 
'dbd_pg_sequence');
+};
+ok( ! $@, 'DB handle method "last_insert_id" works when given a valid sequence 
and an invalid table');
+like( $result, qr{^\d+$}, 'DB handle method "last_insert_id" returns a numeric 
value');
+
+eval {
        $result = $dbh->last_insert_id(undef,undef,'dbd_pg_test',undef);
 };
 ok( ! $@, 'DB handle method "last_insert_id" works when given a valid table');

Reply via email to