X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frun%2F05multipk.tl;h=e60f006ab24a5540ddf5162c9978e454ca62ab55;hb=bab77431c4723e1625740c08c9c53742b689cbdb;hp=2f49936f19d8e9c05c31f72350218fb21aa69b5d;hpb=3712e4f41b929456d8fad713ca702e4a48e9a940;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/run/05multipk.tl b/t/run/05multipk.tl index 2f49936..e60f006 100644 --- a/t/run/05multipk.tl +++ b/t/run/05multipk.tl @@ -1,11 +1,12 @@ sub run_tests { - -plan tests => 3; - -ok(DBICTest->class("FourKeys")->find(1,2,3,4), "find multiple pks without hash"); -ok(DBICTest->class("FourKeys")->find(5,4,3,6), "find multiple pks without hash"); - -is(DBICTest->class("FourKeys")->find(1,2,3,4)->ID, 'DBICTest::FourKeys|bar=2|foo=1|goodbye=4|hello=3', 'unique object id ok for multiple pks'); +my $schema = shift; + +plan tests => 4; +$artist = DBICTest::Artist->find(1); +ok($artist->find_related('twokeys', {cd => 1}), "find multiple pks using relationships + args"); +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'); }