7 use DBICTest::Schema::Artist;
9 my $pkg = 'DBICTest::Schema::Artist';
11 for my $call (qw(has_many might_have has_one belongs_to)) {
13 local $TODO = 'stupid stupid heuristic - needs to die'
14 if $call eq 'belongs_to';
17 $pkg->$call( foos => 'nonexistent bars', { foo => 'self.artistid' } );
18 } qr/Malformed relationship condition key 'foo': must be prefixed with 'foreign.'/,
19 "Correct exception on $call with malformed foreign.";
23 $pkg->has_many( foos => 'nonexistent bars', { 'foreign.foo' => 'name' } );
24 } qr/\QMalformed relationship condition value 'name': must be prefixed with 'self.'/,
25 "Correct exception on $call with malformed self.";