use strict;
use Test::More;
+use Test::Exception;
BEGIN {
eval "use DBIx::Class::CDBICompat;";
}
my $thing = Thing->construct({ thing_id => 23, date => "01-02-1994" });
-eval {
- $thing->set( date => DateTime->now );
+my $date = DateTime->now;
+lives_ok {
+ $thing->set( date => $date );
+ $thing->set( date => $date );
};
-is $@, '';
+
+
$thing->discard_changes;