X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F746mssql.t;h=09f065feeaad815e6279f643174ffd6372595ce4;hb=34ff59bba9adac4e41508693d5f5dfa63332f9a4;hp=74006986bb56f783c077a0285111804915b61927;hpb=818ec409baa3cd8a520bb6164a83e9a90fb84674;p=dbsrgits%2FDBIx-Class.git diff --git a/t/746mssql.t b/t/746mssql.t index 7400698..09f065f 100644 --- a/t/746mssql.t +++ b/t/746mssql.t @@ -12,7 +12,7 @@ my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_ODBC_${_}" } qw/DSN USER PA plan skip_all => 'Set $ENV{DBICTEST_MSSQL_ODBC_DSN}, _USER and _PASS to run this test' unless ($dsn && $user); -plan tests => 29; +plan tests => 31; my $schema = DBICTest::Schema->connect($dsn, $user, $pass); @@ -94,11 +94,17 @@ my $rs = $schema->resultset('Money'); my $row; lives_ok { - $row = $rs->create({ amount => \'cast(100.00 as money)' }); + $row = $rs->create({ amount => 100 }); } 'inserted a money value'; is $rs->find($row->id)->amount, '100.00', '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'; + $schema->storage->dbh_do (sub { my ($storage, $dbh) = @_; eval { $dbh->do("DROP TABLE Owners") };