API-MailboxOrg
view release on metacpan or search on metacpan
t/types/001_hashref_restricted.t view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use Test::Spec;
use Test::Exception;
use File::Basename;
use lib dirname(__FILE__);
use API::MailboxOrg::Types qw(HashRefRestricted);
describe 'HashRefRestricted' => sub {
it 'allows an empty hash' => sub {
my $type = HashRefRestricted([qw/a b/]); # allow keys a and b only
ok $type->( {} );
};
it 'allows only the defined keys, using all allowed keys' => sub {
t/types/002_boolean.t view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use Test::Spec;
use Test::Exception;
use File::Basename;
use lib dirname(__FILE__);
use API::MailboxOrg::Types qw(Boolean);
use JSON::PP;
{
package # private package - do not index
TestClass;
use Moo;
use API::MailboxOrg::Types qw(Boolean);
( run in 0.294 second using v1.01-cache-2.11-cpan-87723dcf8b7 )