Commit | Line | Data |
---|---|---|
e60dc79f | 1 | use strict; |
4a233f30 | 2 | use warnings; |
e60dc79f | 3 | use Test::More; |
4c9f72c1 | 4 | use Test::Exception; |
d9bd5195 | 5 | |
97d61088 | 6 | use lib 't/cdbi/testlib'; |
d9bd5195 | 7 | use DBIC::Test::SQLite (); # this will issue the necessary SKIPs on missing reqs |
e60dc79f | 8 | |
9 | BEGIN { | |
d9bd5195 | 10 | eval { require DateTime; DateTime->VERSION(0.55) } |
11 | or plan skip_all => 'DateTime 0.55 required for this test'; | |
e60dc79f | 12 | } |
13 | ||
14 | { | |
15 | package Thing; | |
16 | ||
97d61088 | 17 | use base 'DBIC::Test::SQLite'; |
e60dc79f | 18 | |
19 | Thing->columns(All => qw[thing_id this that date]); | |
20 | } | |
21 | ||
22 | my $thing = Thing->construct({ thing_id => 23, date => "01-02-1994" }); | |
4c9f72c1 | 23 | my $date = DateTime->now; |
24 | lives_ok { | |
25 | $thing->set( date => $date ); | |
26 | $thing->set( date => $date ); | |
e60dc79f | 27 | }; |
4c9f72c1 | 28 | |
e60dc79f | 29 | $thing->discard_changes; |
d9bd5195 | 30 | |
31 | done_testing; |