move schema state copy to _copy_state_from
[dbsrgits/DBIx-Class.git] / t / 746mssql.t
index bafbef2..0193753 100644 (file)
@@ -57,7 +57,9 @@ my %opts = (
   use_mars =>
     { opts => { on_connect_call => 'use_mars' } },
   use_dynamic_cursors =>
-    { opts => { on_connect_call => 'use_dynamic_cursors' }, required => 1 },
+    { opts => { on_connect_call => 'use_dynamic_cursors' },
+      required => $schema->storage->_using_freetds ? 0 : 1,
+    },
   use_server_cursors =>
     { opts => { on_connect_call => 'use_server_cursors' } },
   NO_OPTION =>
@@ -133,6 +135,8 @@ SQL
       is_deeply \@result, \@map, "multiple active statements in $opts_name";
 
       $artist_rs->delete;
+
+      is($artist_rs->count, 0, '$dbh still viable');
     }
 
 # Test populate
@@ -507,7 +511,7 @@ SQL
       TODO: {
         my $freetds_and_dynamic_cursors = 1
           if $opts_name eq 'use_dynamic_cursors' &&
-            $schema->storage->using_freetds;
+            $schema->storage->_using_freetds;
 
         local $TODO =
 'these tests fail on freetds with dynamic cursors for some reason'