nuke DBI->trace calls
[dbsrgits/DBIx-Class.git] / t / run / 145db2.tl
index 4c860bf..aa721b1 100644 (file)
@@ -8,13 +8,16 @@ my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_DB2_${_}" } qw/DSN USER PASS/};
 plan skip_all, 'Set $ENV{DBICTEST_DB2_DSN}, _USER and _PASS to run this test'
   unless ($dsn && $user);
 
-plan tests => 5;
+plan tests => 6;
 
 DBICTest::Schema->compose_connection('DB2Test' => $dsn, $user, $pass);
 
 my $dbh = DB2Test->schema->storage->dbh;
 
-$dbh->do("DROP TABLE artist;");
+{
+    local $SIG{__WARN__} = sub {};
+    $dbh->do("DROP TABLE artist;");
+}
 
 $dbh->do("CREATE TABLE artist (artistid INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), name VARCHAR(255), charfield CHAR(10));");
 
@@ -36,16 +39,16 @@ my $it = DB2Test::Artist->search( {},
       }
 );
 is( $it->count, 3, "LIMIT count ok" );
-is( $it->next->name, "Artist 2", "iterator->next ok" );
-$it->next;
+is( $it->next->name, "foo", "iterator->next ok" );
 $it->next;
+is( $it->next->name, "Artist 2", "iterator->next ok" );
 is( $it->next, undef, "next past end of resultset ok" );
 
 my $test_type_info = {
     'artistid' => {
         'data_type' => 'INTEGER',
         'is_nullable' => 0,
-        'size' => 11
+        'size' => 10
     },
     'name' => {
         'data_type' => 'VARCHAR',
@@ -53,7 +56,7 @@ my $test_type_info = {
         'size' => 255
     },
     'charfield' => {
-        'data_type' => 'VARCHAR',
+        'data_type' => 'CHAR',
         'is_nullable' => 1,
         'size' => 10 
     },