Fixup SQLA monkeypatch in anticipation of new SQLA version
[dbsrgits/DBIx-Class.git] / t / 746sybase.t
index 6a75029..4bcc6dd 100644 (file)
@@ -1,5 +1,5 @@
 use strict;
-use warnings;  
+use warnings;
 no warnings 'uninitialized';
 
 use Test::More;
@@ -346,10 +346,11 @@ SQL
       $dbh->do(qq[
         CREATE TABLE bindtype_test 
         (
-          id    INT   IDENTITY PRIMARY KEY,
-          bytea IMAGE NULL,
-          blob  IMAGE NULL,
-          clob  TEXT  NULL
+          id     INT   IDENTITY PRIMARY KEY,
+          bytea  IMAGE NULL,
+          blob   IMAGE NULL,
+          clob   TEXT  NULL,
+          a_memo IMAGE NULL
         )
       ],{ RaiseError => 1, PrintError => 0 });
     }
@@ -441,11 +442,13 @@ SQL
           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';
@@ -471,12 +474,14 @@ SQL
             bytea => 1,
             blob => $binstr{large},
             clob => $new_str,
+            a_memo => 2,
           },
           {
             id => 2,
             bytea => 1,
             blob => $binstr{large},
             clob => $new_str,
+            a_memo => 2,
           },
         ]);
       } 'insert_bulk with blobs and explicit identity does NOT die';
@@ -556,23 +561,24 @@ SQL
     $row = $rs->create({ amount => 100 });
   } 'inserted a money value';
 
-  is eval { $rs->find($row->id)->amount }, 100, 'money value round-trip';
+  cmp_ok eval { $rs->find($row->id)->amount }, '==', 100,
+    'money value round-trip';
 
   lives_ok {
     $row->update({ amount => 200 });
   } 'updated a money value';
 
-  is eval { $rs->find($row->id)->amount },
-    200, 'updated money value round-trip';
+  cmp_ok eval { $rs->find($row->id)->amount }, '==', 200,
+    'updated money value round-trip';
 
   lives_ok {
     $row->update({ amount => undef });
   } 'updated a money value to NULL';
 
-  lives_ok {
+  lives_and {
     my $null_amount = $rs->find($row->id)->amount;
-    is ($null_amount, undef, 'updated money value to NULL round-trip');
-  };
+    is $null_amount, undef;
+  } 'updated money value to NULL round-trip';
 
 # Test computed columns and timestamps
   $schema->storage->dbh_do (sub {