MySQL Parser now handles views more completely
[dbsrgits/SQL-Translator.git] / t / 02mysql-parser.t
index 45321cc..46f3277 100644 (file)
@@ -664,7 +664,18 @@ BEGIN {
     is( $view3->name, 'vs_asset3', 'Found "vs_asset3" view' );
     like($view1->sql, qr/ALGORITHM=UNDEFINED/, "Detected algorithm");
     like($view1->sql, qr/vs_asset/, "Detected view vs_asset");
-    unlike($view1->sql, qr/cfgmgmt_mig/, "Did not detect cfgmgmt_mig");
+
+    # KYC - commenting this out as I don't understand why this string
+    # should /not/ be detected when it is in the SQL - 2/28/12
+    # like($view1->sql, qr/cfgmgmt_mig/, "Did not detect cfgmgmt_mig");
+
+    is( join(',', $view1->fields),
+        join(',', qw[ asset_id fq_name folder_name asset_name annotation
+            asset_type foreign_asset_id foreign_asset_id2 date_created
+            date_modified container_id creator_id modifier_id user_access
+        ] ),
+        'First view has correct fields'
+    );
 
     my @procs = $schema->get_procedures;
     is( scalar @procs, 2, 'Right number of procedures (2)' );