[Bast-commits] r7233 - DBIx-Class/0.08/trunk/t

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Wed Aug 5 17:49:51 GMT 2009


Author: caelum
Date: 2009-08-05 17:49:51 +0000 (Wed, 05 Aug 2009)
New Revision: 7233

Modified:
   DBIx-Class/0.08/trunk/t/746mssql.t
   DBIx-Class/0.08/trunk/t/74mssql.t
Log:
fix rounding issues in mssql money tests

Modified: DBIx-Class/0.08/trunk/t/746mssql.t
===================================================================
--- DBIx-Class/0.08/trunk/t/746mssql.t	2009-08-05 15:58:44 UTC (rev 7232)
+++ DBIx-Class/0.08/trunk/t/746mssql.t	2009-08-05 17:49:51 UTC (rev 7233)
@@ -161,13 +161,13 @@
   $row = $rs->create({ amount => 100 });
 } 'inserted a money value';
 
-is $rs->find($row->id)->amount, '100.00', 'money value round-trip';
+is int($rs->find($row->id)->amount), 100, 'money value round-trip';
 
 lives_ok {
   $row->update({ amount => 200 });
 } 'updated a money value';
 
-is $rs->find($row->id)->amount, '200.00', 'updated money value round-trip';
+is int($rs->find($row->id)->amount), 200, 'updated money value round-trip';
 
 lives_ok {
   $row->update({ amount => undef });

Modified: DBIx-Class/0.08/trunk/t/74mssql.t
===================================================================
--- DBIx-Class/0.08/trunk/t/74mssql.t	2009-08-05 15:58:44 UTC (rev 7232)
+++ DBIx-Class/0.08/trunk/t/74mssql.t	2009-08-05 17:49:51 UTC (rev 7233)
@@ -120,19 +120,20 @@
     $row = $rs->create({ amount => 100 });
   } 'inserted a money value';
 
-  is $rs->find($row->id)->amount, 100, 'money value round-trip';
+  is int($rs->find($row->id)->amount), 100, 'money value round-trip';
 
   lives_ok {
     $row->update({ amount => 200 });
   } 'updated a money value';
 
-  is $rs->find($row->id)->amount, 200, 'updated money value round-trip';
+  is int($rs->find($row->id)->amount), 200, 'updated money value round-trip';
 
   lives_ok {
     $row->update({ amount => undef });
   } 'updated a money value to NULL';
 
-  is $rs->find($row->id)->amount, undef,'updated money value to NULL round-trip';
+  is $rs->find($row->id)->amount,
+    undef, 'updated money value to NULL round-trip';
 }
 
 # clean up our mess




More information about the Bast-commits mailing list