Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / cdbi / set_to_undef.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
54a9a088 2use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt cdbicompat );
83eef562 3
4c9f72c1 4use strict;
4a233f30 5use warnings;
d9bd5195 6
83eef562 7use Test::More;
97d61088 8use lib 't/cdbi/testlib';
1f17ec27 9
10# Don't use Test::NoWarnings because of an unrelated DBD::SQLite warning.
11my @warnings;
12local $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
24my $thing = Thing->construct({ thing_id => 23, this => 42 });
25$thing->set( this => undef );
1f17ec27 26is $thing->get( "this" ), undef, 'undef set';
4c9f72c1 27$thing->discard_changes;
1f17ec27 28
29is @warnings, 0, 'no warnings';
d9bd5195 30
31done_testing;