(optdeps) Rename an inconsistent 'icdt' marker to 'ic_dt' before we've shipped it
[dbsrgits/DBIx-Class.git] / t / cdbi / set_to_undef.t
1 use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt cdbicompat );
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7 use lib 't/cdbi/testlib';
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 };
14
15 {
16     package Thing;
17
18     use base 'DBIC::Test::SQLite';
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 );
25 is $thing->get( "this" ), undef, 'undef set';
26 $thing->discard_changes;
27
28 is @warnings, 0, 'no warnings';
29
30 done_testing;