throw error when doing parameterized join twice on same relation
[dbsrgits/DBIx-Class-ParameterizedJoinHack.git] / t / 00basic.t
index 8b0e9bc..8b58399 100644 (file)
@@ -83,12 +83,13 @@ subtest 'has_many' => sub {
     };
 
     subtest 'overrides' => sub {
-        is $people
-            ->$join_with_min(19)
-            ->$join_with_min(29)
-            ->$search
-            ->$fetch_count,
-            1, 'overridden parameter';
+        like exception {
+            $people
+                ->$join_with_min(19)
+                ->$join_with_min(29)
+                ->$search
+                ->$fetch_count;
+        }, qr{once.+per.+relation}i, 'throws error';
     };
 
     subtest 'multi parameter' => sub {