X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ficdt%2Foffline_pg.t;h=bfd931ce6f33c7d44bc81bad19db7f27e437f583;hb=591df363660658ed30e60438c5251ca480925a6f;hp=aca2cc329e9304fc30e7a2012cc547a6617d947a;hpb=bf3587cecb3637047323634b0e00a5fbcb4a3409;p=dbsrgits%2FDBIx-Class.git diff --git a/t/icdt/offline_pg.t b/t/icdt/offline_pg.t index aca2cc3..bfd931c 100644 --- a/t/icdt/offline_pg.t +++ b/t/icdt/offline_pg.t @@ -1,3 +1,4 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt_pg ); use strict; @@ -5,7 +6,7 @@ use warnings; use Test::More; use Test::Warn; -use lib qw(t/lib); + use DBICTest; DBICTest::Schema->load_classes('EventTZPg'); @@ -22,11 +23,22 @@ DBICTest::Schema->load_classes('EventTZPg'); my $parser = $s->storage->datetime_parser; is( $parser, 'DateTime::Format::Pg', 'datetime_parser is as expected'); + my $colinfo = $s->source('EventTZPg')->column_info('created_on'); + is ( + $colinfo->{timezone}, + $colinfo->{time_zone}, + 'Legacy timezone key is still present in colinfo', + ); + ok (!$s->storage->_dbh, 'still not connected'); } my $schema = DBICTest->init_schema(); +# this may generate warnings under certain CI flags, hence do it outside of +# the warnings_are below +my $dt = DateTime->new( year => 2000, time_zone => "America/Chicago" ); + warnings_are { my $event = $schema->resultset("EventTZPg")->find(1); $event->update({created_on => '2009-01-15 17:00:00+00'});