X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frun%2F06relationship.tl;h=a66211e1bd326d9cba26ff880a68604b0794b6b3;hb=5b89a7688c79c6b6109ee8ec5d43ee680bd8c22c;hp=b85fea13e60e4e774fcd3331f8125776325b7510;hpb=6d692cff84b07e7684e7e672c4046010e6697d45;p=dbsrgits%2FDBIx-Class.git diff --git a/t/run/06relationship.tl b/t/run/06relationship.tl index b85fea1..a66211e 100644 --- a/t/run/06relationship.tl +++ b/t/run/06relationship.tl @@ -3,7 +3,7 @@ my $schema = shift; use strict; use warnings; -plan tests => 30; +plan tests => 32; # has_a test my $cd = $schema->resultset("CD")->find(4); @@ -38,6 +38,12 @@ if ($INC{'DBICTest/HelperRels.pm'}) { is( ($artist->search_related('cds'))[3]->title, 'Big Flop', 'create_related ok' ); +my( $rs_from_list ) = $artist->search_related_rs('cds'); +is( ref($rs_from_list), 'DBIx::Class::ResultSet', 'search_related_rs in list context returns rs' ); + +( $rs_from_list ) = $artist->cds_rs(); +is( ref($rs_from_list), 'DBIx::Class::ResultSet', 'relation_rs in list context returns rs' ); + # count_related is( $artist->count_related('cds'), 4, 'count_related ok' );