Revert prematurely merged default insert support for Oracle (see below)
[dbsrgits/DBIx-Class.git] / t / 747mssql_ado.t
index 77a88dc..19362dd 100644 (file)
@@ -19,6 +19,7 @@ my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_ADO_${_}" } qw/DSN USER PAS
 plan skip_all => 'Set $ENV{DBICTEST_MSSQL_ADO_DSN}, _USER and _PASS to run this test'
   unless ($dsn && $user);
 
+require DBICTest::Schema;
 DBICTest::Schema->load_classes(qw/VaryingMAX ArtistGUID/);
 
 my %binstr = ( 'small' => join('', map { chr($_) } ( 1 .. 127 )) );
@@ -223,9 +224,7 @@ is $row->artistid, $current_artistid+1,
 my $rs = $schema->resultset('VaryingMAX');
 
 foreach my $size (qw/small large/) {
-  my $orig_debug = $schema->storage->debug;
-
-  $schema->storage->debug(0) if $size eq 'large';
+  local $schema->storage->{debug} = 0 if $size eq 'large';
 
   my $str = $binstr{$size};
   my $row;
@@ -242,8 +241,6 @@ foreach my $size (qw/small large/) {
   cmp_ok try { $row->varchar_max },   'eq', $str, 'VARCHAR(MAX) matches';
   cmp_ok try { $row->nvarchar_max },  'eq', $str, 'NVARCHAR(MAX) matches';
   cmp_ok try { $row->varbinary_max }, 'eq', $str, 'VARBINARY(MAX) matches';
-
-  $schema->storage->debug($orig_debug);
 }
 
 # test regular blobs