X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F89inflate_datetime.t;h=d165c337326cb47818f609fda3503cb50c97b26d;hb=bbdc039bb73622702cbaaa25890349e3f2664fbf;hp=19363d2fcd74f888871d681962f4c7708df8b4df;hpb=4707b40a794920d470053f2cefc6883044f1f7a2;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/89inflate_datetime.t b/t/89inflate_datetime.t index 19363d2..d165c33 100644 --- a/t/89inflate_datetime.t +++ b/t/89inflate_datetime.t @@ -29,13 +29,17 @@ isa_ok($event->starts_at, 'DateTime', 'DateTime returned'); my $starts = $event->starts_at; is("$starts", '2006-04-25T22:24:33', 'Correct date/time'); -ok(my $row = - $schema->resultset('Event')->search({ starts_at => $starts })->single); -is(eval { $row->id }, 1, 'DT in search'); +TODO: { + local $TODO = "We can't do this yet before 0.09" if DBIx::Class->VERSION < 0.09; -ok($row = - $schema->resultset('Event')->search({ starts_at => { '>=' => $starts } })->single); -is(eval { $row->id }, 1, 'DT in search with condition'); + ok(my $row = + $schema->resultset('Event')->search({ starts_at => $starts })->single); + is(eval { $row->id }, 1, 'DT in search'); + + ok($row = + $schema->resultset('Event')->search({ starts_at => { '>=' => $starts } })->single); + is(eval { $row->id }, 1, 'DT in search with condition'); +} # create using DateTime my $created = $schema->resultset('Event')->create({