fix new rel tests for older DBIC
Rafael Kitover [Mon, 8 Mar 2010 07:46:01 +0000 (02:46 -0500)]
t/backcompat/0.04006/lib/dbixcsl_common_tests.pm
t/lib/dbixcsl_common_tests.pm

index 827d5a8..7ab3f98 100644 (file)
@@ -348,10 +348,10 @@ sub run_tests {
 
         # test that _id is not stripped and prepositions in rel names are
         # ignored
-        ok ($class4->has_relationship('loader_test5_to_ids'),
+        ok ($rsobj4->result_source->has_relationship('loader_test5_to_ids'),
             "rel with preposition 'to' and _id pluralized backward-compatibly");
 
-        ok ($class4->has_relationship('loader_test5_from_ids'),
+        ok ($rsobj4->result_source->has_relationship('loader_test5_from_ids'),
             "rel with preposition 'from' and _id pluralized backward-compatibly");
 
         # find on multi-col pk
index 75158fa..059979d 100644 (file)
@@ -511,10 +511,10 @@ sub test_schema {
         isa_ok( $rs_rel4->first, $class4);
 
         # check rel naming with prepositions
-        ok ($class4->has_relationship('loader_test5s_to'),
+        ok ($rsobj4->result_source->has_relationship('loader_test5s_to'),
             "rel with preposition 'to' pluralized correctly");
 
-        ok ($class4->has_relationship('loader_test5s_from'),
+        ok ($rsobj4->result_source->has_relationship('loader_test5s_from'),
             "rel with preposition 'from' pluralized correctly");
 
         # find on multi-col pk