1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
use strict;
use Test::More;
use Test::Exception;
use lib 't/cdbi/testlib';
BEGIN {
eval "use DBIx::Class::CDBICompat;use DateTime 0.55;";
plan skip_all => "DateTime 0.55, Class::Trigger and DBIx::ContextualFetch required: $@"
if $@;
plan tests => 1;
}
{
package Thing;
use base 'DBIC::Test::SQLite';
Thing->columns(All => qw[thing_id this that date]);
}
my $thing = Thing->construct({ thing_id => 23, date => "01-02-1994" });
my $date = DateTime->now;
lives_ok {
$thing->set( date => $date );
$thing->set( date => $date );
};
$thing->discard_changes;
|