Enable pg test disabled god knows why, minor cleanup.
[dbsrgits/DBIx-Class.git] / t / cdbi / set_vs_DateTime.t
CommitLineData
e60dc79f 1use strict;
2use Test::More;
4c9f72c1 3use Test::Exception;
97d61088 4use lib 't/cdbi/testlib';
e60dc79f 5
6BEGIN {
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
97d61088 17 use base 'DBIC::Test::SQLite';
e60dc79f 18
19 Thing->columns(All => qw[thing_id this that date]);
20}
21
22my $thing = Thing->construct({ thing_id => 23, date => "01-02-1994" });
4c9f72c1 23my $date = DateTime->now;
24lives_ok {
25 $thing->set( date => $date );
26 $thing->set( date => $date );
e60dc79f 27};
4c9f72c1 28
29
e60dc79f 30
31$thing->discard_changes;