Skip to content

add unit tests for TypeConstraints #173

@sherrardb

Description

@sherrardb

who's watching the watchers? :-)

my $source_id_type = Moose::Util::TypeConstraints::find_type_constraint( 'StripeSourceId' );
isa_ok $source_id_type, 'Moose::Meta::TypeConstraint';
lives_ok { $source_id_type->assert_valid( 'src_123' ) } 'valid source id';
throws_ok { $source_id_type->assert_valid( 'cus_123' ) } qr/Value 'cus_123' must be a source id string of the form src_\.\+/, 'invalid source id';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions