From: Tina Mueller Date: Fri, 14 Aug 2015 11:51:53 +0000 (+0200) Subject: add a TODO test for copy() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a6afe5581a58a066fb0084cb9960acdeddca7c5;p=dbsrgits%2FDBIx-Class-Historic.git add a TODO test for copy() --- diff --git a/t/icdt/engine_specific/sybase.t b/t/icdt/engine_specific/sybase.t index 5f6efc8..e114a8e 100644 --- a/t/icdt/engine_specific/sybase.t +++ b/t/icdt/engine_specific/sybase.t @@ -102,6 +102,31 @@ SQL cmp_ok( $row->$col->nanosecond, '==', $sample_dt->{nanosecond}, 'DateTime fractional portion roundtrip' ) if exists $sample_dt->{nanosecond}; + + { + # copy() uses get_columns() + # the values should survive a roundtrip also + + # my %col = $row->get_columns; + + # result: 2004-08-21T14:36:48.500Z + # error message from Sybase in an insert/update: + # Syntax error during implicit conversion of VARCHAR value + # '2004-08-21T14:36:48.500Z' to a DATETIME field. + + # doing this: + # $_[0]->dbh->syb_date_fmt('ISO'); + # will result in a string that's accepted for an insert, however + # then the default datetime parser + # DBIx::Class::Storage::DBI::Sybase::ASE::DateTime::Format + # will die on inflating. Additionally you will need + # DBIx::Class::Storage::DBI::Sybase::ASE + # ->datetime_parser_type("DateTime::Format::Sybase"); + local $TODO = "copy() doesn't work for datetime columns with the default datetime_setup"; + lives_ok(sub { + $row->copy + }, "copy()"); + } } # test a computed datetime column