sub add_relationship {
my ($class, $rel, $f_class, $cond, $attrs) = @_;
+ die "Can't create relationship without join condition" unless $cond;
my %rels = %{ $class->_relationships };
$rels{$rel} = { class => $f_class,
cond => $cond,
eval {
$artist->add_relationship( tracks => 'DBICTest::Track' );
};
-like($@, qr/no join condition/, 'failed when creating a rel without join condition, ok');
+like($@, qr/join condition/, 'failed when creating a rel without join condition, ok');