Stop shipping world writeable files in our tarball
[dbsrgits/DBIx-Class.git] / t / cdbi / set_vs_DateTime.t
CommitLineData
e60dc79f 1use strict;
2use Test::More;
4c9f72c1 3use Test::Exception;
d9bd5195 4
97d61088 5use lib 't/cdbi/testlib';
d9bd5195 6use DBIC::Test::SQLite (); # this will issue the necessary SKIPs on missing reqs
e60dc79f 7
8BEGIN {
d9bd5195 9 eval { require DateTime; DateTime->VERSION(0.55) }
10 or plan skip_all => 'DateTime 0.55 required for this test';
e60dc79f 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
e60dc79f 28$thing->discard_changes;
d9bd5195 29
30done_testing;