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({
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');