Remove TODO labels from blocks not using todo_skip() - no test changes
[dbsrgits/DBIx-Class.git] / t / 746mssql.t
index 9b6ce5b..b822138 100644 (file)
@@ -43,10 +43,9 @@ my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
 isa_ok( $schema->storage, 'DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server' );
 
 {
-  my $schema2 = $schema->connect ($schema->storage->connect_info);
+  my $schema2 = $schema->connect (@{$schema->storage->connect_info});
   ok (! $schema2->storage->connected, 'a re-connected cloned schema starts unconnected');
 }
-
 $schema->storage->_dbh->disconnect;
 
 lives_ok {
@@ -252,7 +251,7 @@ SQL
         my $test_type = "Dialect:$dialect Quoted:$quoted";
 
         # basic limit support
-        TODO: {
+        {
           my $art_rs = $schema->resultset ('Artist');
           $art_rs->delete;
           $art_rs->create({ name => 'Artist ' . $_ }) for (1..6);
@@ -374,15 +373,20 @@ SQL
         );
 
         my ($sql, @bind) = @${$owners->page(3)->as_query};
+        # not testing the SQL as it is quite different between top/rno
         is_same_bind (
           \@bind,
           [
-            ($dialect eq 'Top' ? [ { dbic_colname => 'test' } => 'xxx' ] : ()), # the extra re-order bind
-            [ { sqlt_datatype => 'varchar', sqlt_size => 100, dbic_colname => 'me.name' }
-              => 'somebogusstring' ],
             [ { dbic_colname => 'test' }
               => 'xxx' ],
-            ($dialect ne 'Top' ? ( [ $OFFSET => 7 ], [ $TOTAL => 9 ] ) : ()), # parameterised RNO
+            [ { sqlt_datatype => 'varchar', sqlt_size => 100, dbic_colname => 'me.name' }
+              => 'somebogusstring' ],
+
+            ($dialect eq 'Top'
+              ? [ { dbic_colname => 'test' } => 'xxx' ]  # the extra re-order bind
+              : ([ $OFFSET => 7 ], [ $TOTAL => 9 ]) # parameterised RNO
+            ),
+
             [ { sqlt_datatype => 'varchar', sqlt_size => 100, dbic_colname => 'me.name' }
               => 'somebogusstring' ],
             [ { dbic_colname => 'test' }
@@ -394,7 +398,7 @@ SQL
         is ($owners->page(1)->count, 3, "$test_type: has-many prefetch returns correct count");
 
         is ($owners->page(3)->count, 2, "$test_type: has-many prefetch returns correct count");
-        TODO: {
+        {
           local $TODO = "Top-limit does not work when your limit ends up past the resultset"
             if $dialect eq 'Top';
           is ($owners->page(3)->all, 2, "$test_type: has_many prefetch returns correct number of rows");
@@ -418,6 +422,7 @@ SQL
         );
 
         ($sql, @bind) = @${$books->page(3)->as_query};
+        # not testing the SQL as it is quite different between top/rno
         is_same_bind (
           \@bind,
           [
@@ -447,7 +452,7 @@ SQL
         is ($books->page(1)->count, 2, "$test_type: Prefetched grouped search returns correct count");
 
         is ($books->page(2)->count, 1, "$test_type: Prefetched grouped search returns correct count");
-        TODO: {
+        {
           local $TODO = "Top-limit does not work when your limit ends up past the resultset"
             if $dialect eq 'Top';
           is ($books->page(2)->all, 1, "$test_type: Prefetched grouped search returns correct number of rows");
@@ -517,7 +522,7 @@ CREATE TABLE money_test (
 SQL
       });
 
-      TODO: {
+      {
         my $freetds_and_dynamic_cursors = 1
           if $opts_name eq 'use_dynamic_cursors' &&
             $schema->storage->_using_freetds;