Commit | Line | Data |
---|---|---|
c0329273 | 1 | BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } |
54a9a088 | 2 | use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt cdbicompat ); |
83eef562 | 3 | |
4c9f72c1 | 4 | use strict; |
4a233f30 | 5 | use warnings; |
d9bd5195 | 6 | |
83eef562 | 7 | use Test::More; |
97d61088 | 8 | use lib 't/cdbi/testlib'; |
1f17ec27 | 9 | |
10 | # Don't use Test::NoWarnings because of an unrelated DBD::SQLite warning. | |
11 | my @warnings; | |
12 | local $SIG{__WARN__} = sub { | |
13 | push @warnings, @_; | |
14 | }; | |
14e38771 | 15 | |
4c9f72c1 | 16 | { |
17 | package Thing; | |
18 | ||
97d61088 | 19 | use base 'DBIC::Test::SQLite'; |
4c9f72c1 | 20 | |
21 | Thing->columns(All => qw[thing_id this that date]); | |
22 | } | |
23 | ||
24 | my $thing = Thing->construct({ thing_id => 23, this => 42 }); | |
25 | $thing->set( this => undef ); | |
1f17ec27 | 26 | is $thing->get( "this" ), undef, 'undef set'; |
4c9f72c1 | 27 | $thing->discard_changes; |
1f17ec27 | 28 | |
29 | is @warnings, 0, 'no warnings'; | |
d9bd5195 | 30 | |
31 | done_testing; |