From: Christopher H. Laco Date: Thu, 7 Sep 2006 01:00:22 +0000 (+0000) Subject: Fixed inflate_datetime tests under older Test::More X-Git-Tag: v0.07002~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6d2d616060ab47feb43935bd6712f586eb313c8e;p=dbsrgits%2FDBIx-Class.git Fixed inflate_datetime tests under older Test::More --- diff --git a/Changes b/Changes index ea0f107..c452124 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Revision history for DBIx::Class 0.07002 + - fixed inflate_datetime.t tests/stringify under older Test::More - cleared up Relationship docs, and fixed some typos - use ref instead of eval to check limit syntax (to avoid issues with Devel::StackTrace) diff --git a/t/89inflate_datetime.t b/t/89inflate_datetime.t index 85bddeb..a3bc582 100644 --- a/t/89inflate_datetime.t +++ b/t/89inflate_datetime.t @@ -18,8 +18,8 @@ my $event = $schema->resultset("Event")->find(1); isa_ok($event->starts_at, 'DateTime', 'DateTime returned'); # klunky, but makes older Test::More installs happy -my $starts = $event->starts_at . ''; -is($starts, '2006-04-25T22:24:33', 'Correct date/time'); +my $starts = $event->starts_at; +is("$starts", '2006-04-25T22:24:33', 'Correct date/time'); # create using DateTime my $created = $schema->resultset('Event')->create({ @@ -29,16 +29,16 @@ my $created = $schema->resultset('Event')->create({ my $created_start = $created->starts_at; isa_ok($created->starts_at, 'DateTime', 'DateTime returned'); -is($created_start, '2006-06-18T00:00:00', 'Correct date/time'); +is("$created_start", '2006-06-18T00:00:00', 'Correct date/time'); ## timestamp field isa_ok($event->created_on, 'DateTime', 'DateTime returned'); # klunky, but makes older Test::More installs happy -my $createo = $event->created_on . ''; -is($createo, '2006-06-22T21:00:05', 'Correct date/time'); +my $createo = $event->created_on; +is("$createo", '2006-06-22T21:00:05', 'Correct date/time'); my $created_cron = $created->created_on; isa_ok($created->created_on, 'DateTime', 'DateTime returned'); -is($created_cron, '2006-06-23T00:00:00', 'Correct date/time'); +is("$created_cron", '2006-06-23T00:00:00', 'Correct date/time');