$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 });
$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