1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
11 my $schema = DBICTest->init_schema();
13 # this has been warning for 4 years, killing
15 $schema->resultset('Artist')->find(artistid => 4);
16 } qr|expects either a column/value hashref, or a list of values corresponding to the columns of the specified unique constraint|;
19 my $exception_callback_count = 0;
21 my $ea = $schema->exception_action(sub {
22 $exception_callback_count++;
26 # No, this is not a great idea.
27 # Yes, people do it anyway.
28 # Might as well test that we have fixed it for good, by never invoking
29 # a potential __DIE__ handler in internal_try() stacks
30 local $SIG{__DIE__} = sub { $ea->(@_) };
32 # test find on non-unique non-existing value
34 $schema->resultset('Artist')->find({ rank => 666 }),
38 # test find on an unresolvable condition
40 $schema->resultset('Artist')->find({ artistid => [ -and => 1, 2 ]}),
44 is $exception_callback_count, 0, 'exception_callback never invoked';