X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frelationship%2Fcustom.t;h=5bc52d4fea84cf2b8c1616f6ba36c6d940ede9e9;hb=bad0b73b680b041ca8ce677365ca1f6387232e61;hp=131ebe1bd4393cb4cb68954908e02b57a6fb9238;hpb=e884e5d9de1fcb734ab4598e6b2923293b0674f7;p=dbsrgits%2FDBIx-Class.git diff --git a/t/relationship/custom.t b/t/relationship/custom.t index 131ebe1..5bc52d4 100644 --- a/t/relationship/custom.t +++ b/t/relationship/custom.t @@ -307,4 +307,9 @@ is_deeply 'set from related via coderef cond inflates properly', ; +throws_ok { + local $schema->source('Track')->relationship_info('cd_cref_cond')->{cond} = sub { 1,2,3 }; + $schema->resultset('Track')->find({ cd_cref_cond => {} }); +} qr/\QA custom condition coderef can return at most 2 conditions, but relationship 'cd_cref_cond' on source 'Track' returned extra values: 3/; + done_testing;