X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F65multipk.t;h=31c0d41c85eac1d63a62c07e65a167fb7f7989f3;hb=e570488ade8f327f47dd3318db3443a348d561d6;hp=4499b49eb0f5148008caff6eb9392062a8ef6716;hpb=a47e123334d8bcea0d34dc9ea09738d6f3b1fd49;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/65multipk.t b/t/65multipk.t index 4499b49..31c0d41 100644 --- a/t/65multipk.t +++ b/t/65multipk.t @@ -1,16 +1,20 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; -use warnings; +use warnings; use Test::More; -use lib qw(t/lib); + use DBICTest; my $schema = DBICTest->init_schema(); -plan tests => 4; +plan tests => 5; -my $artist = DBICTest::Artist->find(1); +my $artist = $schema->resultset("Artist")->find(1); ok($artist->find_related('twokeys', {cd => 1}), "find multiple pks using relationships + args"); + +ok($schema->resultset("FourKeys")->search({ foo => 1, bar => 2 })->find({ hello => 3, goodbye => 4 }), "search on partial key followed by a find"); ok($schema->resultset("FourKeys")->find(1,2,3,4), "find multiple pks without hash"); ok($schema->resultset("FourKeys")->find(5,4,3,6), "find multiple pks without hash"); is($schema->resultset("FourKeys")->find(1,2,3,4)->ID, 'DBICTest::FourKeys|fourkeys|bar=2|foo=1|goodbye=4|hello=3', 'unique object id ok for multiple pks');