blob: 58f4405c7e235c343eabd3302123dacd76af86e6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Test::Fatal;
{
package Foo;
use Moose;
use MooseX::Bread::Board;
has foo => (
is => 'ro',
isa => 'Ref',
value => 'FOO',
);
}
{
my $foo = Foo->new;
like(exception { $foo->foo },
qr/^Attribute \(foo\) does not pass the type constraint because: Validation failed for 'Ref' with value FOO/,
"error when service returns invalid value");
}
done_testing;
|