From: Dmitry Latin Date: Wed, 9 Apr 2014 16:52:55 +0000 (+0400) Subject: Add test for update with literal bind for inflating column X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c93f74ada2dfa2273ef187ebc4e781232efce28f;p=dbsrgits%2FDBIx-Class-Historic.git Add test for update with literal bind for inflating column --- diff --git a/t/update/inflate_literal_bind.t b/t/update/inflate_literal_bind.t new file mode 100644 index 0000000..38527e3 --- /dev/null +++ b/t/update/inflate_literal_bind.t @@ -0,0 +1,34 @@ +use strict; +use warnings; + +use Test::More; +use Test::Warn; +use Try::Tiny; +use lib qw(t/lib); +use DBICTest; + +my $schema = DBICTest->init_schema(); + +my $event = $schema->resultset("Event")->find(1); + +ok( + $event->update( + { + starts_at => \[ + 'MAX(datetime(?), datetime(?))', '2006-04-25T22:24:33', + '2007-04-25T22:24:33', + ] + } + ), + 'update without error' +); + +$event = $event->get_from_storage(); + +is( + $event->starts_at . '', + '2007-04-25T22:24:33', + 'starts_at updated properly' +); + +done_testing;