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