Oracle sequence detection
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 25backcompat.t
index 75fad57..cc4a755 100644 (file)
@@ -1105,6 +1105,12 @@ sub run_v4_tests {
 
     isa_ok eval { $foo->email_to_ids }, 'DBIx::Class::ResultSet',
         'correct rel name inflection in 0.04006 mode';
+
+    ok (($schema->resultset('Routechange')->find(1)->can('quuxsid')),
+        'correct column accessor in 0.04006 mode');
+
+    is $schema->resultset('Routechange')->find(1)->foo2bar, 3,
+        'correct column accessor for column with word ending with digit in v4 mode';
 }
 
 sub run_v5_tests {
@@ -1129,6 +1135,12 @@ sub run_v5_tests {
 
     isa_ok eval { $foo->email_to_ids }, 'DBIx::Class::ResultSet',
         'correct rel name inflection in v5 mode';
+
+    ok (($schema->resultset('Routechange')->find(1)->can('quuxsid')),
+        'correct column accessor in v5 mode');
+
+    is $schema->resultset('Routechange')->find(1)->foo2bar, 3,
+        'correct column accessor for column with word ending with digit in v5 mode';
 }
 
 sub run_v6_tests {
@@ -1158,6 +1170,12 @@ sub run_v6_tests {
 
     isa_ok eval { $route_change->quuxsid }, $res->{classes}{quuxs},
         'correct rel name in v6 mode';
+
+    ok (($schema->resultset('Routechange')->find(1)->can('quuxsid')),
+        'correct column accessor in v6 mode');
+
+    is $schema->resultset('Routechange')->find(1)->foo2bar, 3,
+        'correct column accessor for column with word ending with digit in v6 mode';
 }
 
 sub run_v7_tests {
@@ -1187,6 +1205,12 @@ sub run_v7_tests {
 
     isa_ok eval { $route_change->quux }, $res->{classes}{quuxs},
         'correct rel name based on mixed-case column name in current mode';
+
+    ok (($schema->resultset('RouteChange')->find(1)->can('quuxs_id')),
+        'correct column accessor in current mode');
+
+    is $schema->resultset('RouteChange')->find(1)->foo2_bar, 3,
+        'correct column accessor for column with word ending with digit in current mode';
 }
 
 {