X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi-t%2Fset_to_undef.t;fp=t%2Fcdbi-t%2Fset_to_undef.t;h=792c55efc91f5bcbc4755b03e48c1c4d8c33f392;hb=1f17ec275530f0586204c4cb6b05d97e0523df2a;hp=75e0ee6011802a8e0ecb7a9731bc6b306d318185;hpb=5e85c6715197a71ec9bd016992e4e05ae90b14ce;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi-t/set_to_undef.t b/t/cdbi-t/set_to_undef.t index 75e0ee6..792c55e 100644 --- a/t/cdbi-t/set_to_undef.t +++ b/t/cdbi-t/set_to_undef.t @@ -8,10 +8,15 @@ BEGIN { plan skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@" if $@; plan skip_all => "DateTime required" unless eval { require DateTime }; - plan tests => 1; + plan tests => 2; } -use Test::NoWarnings; + +# Don't use Test::NoWarnings because of an unrelated DBD::SQLite warning. +my @warnings; +local $SIG{__WARN__} = sub { + push @warnings, @_; +}; { package Thing; @@ -23,4 +28,7 @@ use Test::NoWarnings; my $thing = Thing->construct({ thing_id => 23, this => 42 }); $thing->set( this => undef ); +is $thing->get( "this" ), undef, 'undef set'; $thing->discard_changes; + +is @warnings, 0, 'no warnings';