Factor out bindattr resolver and tighten code a bit
[dbsrgits/DBIx-Class.git] / t / 746sybase.t
index 4bcc6dd..b82138b 100644 (file)
@@ -4,9 +4,13 @@ no warnings 'uninitialized';
 
 use Test::More;
 use Test::Exception;
+use DBIx::Class::Optional::Dependencies ();
 use lib qw(t/lib);
 use DBICTest;
 
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_ase')
+  unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_ase');
+
 my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_SYBASE_${_}" } qw/DSN USER PASS/};
 
 my $TESTS = 66 + 2;
@@ -344,7 +348,7 @@ SQL
       eval { $dbh->do('DROP TABLE bindtype_test') };
 
       $dbh->do(qq[
-        CREATE TABLE bindtype_test 
+        CREATE TABLE bindtype_test
         (
           id     INT   IDENTITY PRIMARY KEY,
           bytea  IMAGE NULL,
@@ -359,7 +363,7 @@ SQL
     $binstr{'large'} = $binstr{'small'} x 1024;
 
     my $maxloblen = length $binstr{'large'};
-    
+
     if (not $schema->storage->using_freetds) {
       $dbh->{'LongReadLen'} = $maxloblen * 2;
     } else {
@@ -439,16 +443,12 @@ SQL
     lives_ok {
       $rs->populate([
         {
-          bytea => 1,
           blob => $binstr{large},
           clob => $new_str,
-          a_memo => 2,
         },
         {
-          bytea => 1,
           blob => $binstr{large},
           clob => $new_str,
-          a_memo => 2,
         },
       ]);
     } 'insert_bulk with blobs does not die';
@@ -589,7 +589,7 @@ CREATE TABLE computed_column_test (
    id INT IDENTITY PRIMARY KEY,
    a_computed_column AS getdate(),
    a_timestamp timestamp,
-   charfield VARCHAR(20) DEFAULT 'foo' 
+   charfield VARCHAR(20) DEFAULT 'foo'
 )
 SQL
   });