From: Daniel Westermann-Clark <danieltwc@cpan.org>
Date: Thu, 25 May 2006 23:03:12 +0000 (+0000)
Subject: Add a test for a search on a partial key, followed by a find
X-Git-Tag: v0.07002~75^2~155^2~14
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5d1d81d6f69aa466b3be77c221edd347db8b642f;p=dbsrgits%2FDBIx-Class.git

Add a test for a search on a partial key, followed by a find
---

diff --git a/t/65multipk.t b/t/65multipk.t
index 4499b49..084bb8e 100644
--- a/t/65multipk.t
+++ b/t/65multipk.t
@@ -7,10 +7,12 @@ use DBICTest;
 
 my $schema = DBICTest->init_schema();
 
-plan tests => 4;
+plan tests => 5;
 
 my $artist = DBICTest::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');