X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Finflate%2Fdatetime_pg.t;h=c02e9f8b16187541cf9923fdc40bba989cded03c;hb=12b348d9331e09e2a7ab55bf57fbc33476cf174c;hp=d39496fb0a559f86f0d798c00183b476bd541014;hpb=68de943862f06cabd397d2e74d12cd9cdc999779;p=dbsrgits%2FDBIx-Class.git diff --git a/t/inflate/datetime_pg.t b/t/inflate/datetime_pg.t index d39496f..c02e9f8 100644 --- a/t/inflate/datetime_pg.t +++ b/t/inflate/datetime_pg.t @@ -2,20 +2,19 @@ use strict; use warnings; use Test::More; +use Test::Warn; +use DBIx::Class::Optional::Dependencies (); use lib qw(t/lib); use DBICTest; plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt_pg') unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt_pg'); -{ - local $SIG{__WARN__} = sub { warn @_ if $_[0] !~ /extra \=\> .+? has been deprecated/ }; - DBICTest::Schema->load_classes('EventTZPg'); -} +DBICTest::Schema->load_classes('EventTZPg'); my $schema = DBICTest->init_schema(); -{ +warnings_are { my $event = $schema->resultset("EventTZPg")->find(1); $event->update({created_on => '2009-01-15 17:00:00+00'}); $event->discard_changes; @@ -33,6 +32,6 @@ my $schema = DBICTest->init_schema(); is($event->ts_without_tz, $dt, 'timestamp without time zone inflation'); is($event->ts_without_tz->microsecond, $dt->microsecond, 'timestamp without time zone microseconds survived'); -} +} [], 'No warnings during DT manipulations'; done_testing;