X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frun%2F06relationship.tl;h=65a241989a01735e0a3c9ef7e80f1b45d205f15a;hb=0f6ac8bbd6575d44fcb30cefcb5e387bb09d8b79;hp=d29998e39ba50ddba2d524f16fe499b5f4b51dd1;hpb=602afcfac9143b244c45f4cfadec1255c6f15ecf;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/run/06relationship.tl b/t/run/06relationship.tl index d29998e..65a2419 100644 --- a/t/run/06relationship.tl +++ b/t/run/06relationship.tl @@ -3,7 +3,7 @@ my $schema = shift; use strict; use warnings; -plan tests => 18; +plan tests => 20; # has_a test my $cd = $schema->resultset("CD")->find(4); @@ -111,6 +111,8 @@ like($@, qr/join condition/, 'failed when creating a rel without join condition, $cd = $schema->resultset("CD")->find(1); my @producers = $cd->producers(); is( $producers[0]->name, 'Matt S Trout', 'many_to_many ok' ); +is( $cd->producers_sorted->next->name, 'Bob The Builder', 'sorted many_to_many ok' ); +is( $cd->producers_sorted(producerid => 3)->next->name, 'Fred The Phenotype', 'sorted many_to_many with search condition ok' ); # test undirected many-to-many relationship (e.g. "related artists") my $undir_maps = $schema->resultset("Artist")->find(1)->artist_undirected_maps;