X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fnative_traits%2Ftrait_hash.t;h=d319ee84ae0b696548356ab8a7ed4b7496d1b62c;hb=76ae56f182054960e8ffd9663a4ba77306e458df;hp=107b8511d9c27c66b4d5d4d69bdd3b2731d47e5f;hpb=0f90432853e3c52d76ae4172820befd7d344b5ba;p=gitmo%2FMoose.git diff --git a/t/native_traits/trait_hash.t b/t/native_traits/trait_hash.t index 107b851..d319ee8 100644 --- a/t/native_traits/trait_hash.t +++ b/t/native_traits/trait_hash.t @@ -292,4 +292,15 @@ sub run_tests { $class; } +{ + my ($class, $handles) = build_class(isa => 'HashRef'); + my $obj = $class->new; + with_immutable { + is(exception { $obj->option_accessor('foo', undef) }, undef, + "can use accessor to set to undef"); + is(exception { $obj->quantity(undef) }, undef, + "can use accessor to set to undef"); + } $class; +} + done_testing;