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