plan skip_all => 'Set $ENV{DBICTEST_MSSQL_ODBC_DSN}, _USER and _PASS to run this test'
unless ($dsn && $user);
-plan tests => 31;
+plan tests => 33;
my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
CREATE TABLE money_test (
id INT IDENTITY PRIMARY KEY,
- amount money
+ amount MONEY NULL
)
SQL
is $rs->find($row->id)->amount, '200.00', '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';
+
$schema->storage->dbh_do (sub {
my ($storage, $dbh) = @_;
eval { $dbh->do("DROP TABLE Owners") };