From: Rafael Kitover Date: Wed, 5 Aug 2009 17:49:51 +0000 (+0000) Subject: fix rounding issues in mssql money tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c83657164652d11fc7beed196880d1087cef7243;p=dbsrgits%2FDBIx-Class-Historic.git fix rounding issues in mssql money tests --- diff --git a/t/746mssql.t b/t/746mssql.t index 2a96f76..7812d11 100644 --- a/t/746mssql.t +++ b/t/746mssql.t @@ -161,13 +161,13 @@ lives_ok { $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 }); diff --git a/t/74mssql.t b/t/74mssql.t index a3c2cc0..539ebcd 100644 --- a/t/74mssql.t +++ b/t/74mssql.t @@ -120,19 +120,20 @@ SQL $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