Commit | Line | Data |
e60dc79f |
1 | #!/usr/bin/perl -w |
2 | |
3 | use strict; |
4 | use Test::More; |
5 | |
6 | BEGIN { |
7 | eval "use DBIx::Class::CDBICompat;"; |
8 | plan skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@" |
9 | if $@; |
10 | plan skip_all => "DateTime required" unless eval { require DateTime }; |
11 | plan tests => 1; |
12 | } |
13 | |
14 | { |
15 | package Thing; |
16 | |
17 | use base 'DBIx::Class::Test::SQLite'; |
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" }); |
23 | eval { |
24 | $thing->set( date => DateTime->now ); |
25 | }; |
26 | is $@, ''; |
27 | |
28 | $thing->discard_changes; |