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