1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
9 use DBICTest::Schema::Artist;
11 my $pkg = 'DBICTest::Schema::Artist';
13 for my $call (qw(has_many might_have has_one belongs_to)) {
15 local $TODO = 'stupid stupid heuristic - needs to die'
16 if $call eq 'belongs_to';
19 $pkg->$call( foos => 'nonexistent bars', { foo => 'self.artistid' } );
20 } qr/Malformed relationship condition key 'foo': must be prefixed with 'foreign.'/,
21 "Correct exception on $call with malformed foreign.";
25 $pkg->has_many( foos => 'nonexistent bars', { 'foreign.foo' => 'name' } );
26 } qr/\QMalformed relationship condition value 'name': must be prefixed with 'self.'/,
27 "Correct exception on $call with malformed self.";