X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frun%2F05multipk.tl;h=776a38241dbbc0a3c98b56fbe560fa0e69da828a;hb=701da8c4d6f0b78ffc015085aa410a6cacfcdb40;hp=3a0eb0df9538110fe6971eb0aef277afa1bab101;hpb=1f6715abcab925d1a45acfb51e7e9fffbad00c84;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/run/05multipk.tl b/t/run/05multipk.tl index 3a0eb0d..776a382 100644 --- a/t/run/05multipk.tl +++ b/t/run/05multipk.tl @@ -1,11 +1,12 @@ sub run_tests { - -plan tests => 3; - -ok(DBICTest::FourKeys->find(1,2,3,4), "find multiple pks without hash"); -ok(DBICTest::FourKeys->find(5,4,3,6), "find multiple pks without hash"); - -is(DBICTest::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|bar=2|foo=1|goodbye=4|hello=3', 'unique object id ok for multiple pks'); }