Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / t / cdbi / set_vs_DateTime.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2 use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt cdbicompat );
3
4 use strict;
5 use warnings;
6
7 use Test::More;
8 use Test::Exception;
9
10 use lib 't/cdbi/testlib';
11
12 {
13     package Thing;
14
15     use base 'DBIC::Test::SQLite';
16
17     Thing->columns(All  => qw[thing_id this that date]);
18 }
19
20 my $thing = Thing->construct({ thing_id => 23, date => "01-02-1994" });
21 my $date = DateTime->now;
22 lives_ok {
23   $thing->set( date => $date );
24   $thing->set( date => $date );
25 };
26
27 $thing->discard_changes;
28
29 done_testing;