\Q-uote column/alias names in regexes in _resolve_aliastypes_from_select_args
[dbsrgits/DBIx-Class.git] / t / 72pg.t
index 5e4ec84..8e4b142 100644 (file)
--- a/t/72pg.t
+++ b/t/72pg.t
@@ -7,6 +7,7 @@ use Sub::Name;
 use DBIx::Class::Optional::Dependencies ();
 use lib qw(t/lib);
 use DBICTest;
+use SQL::Abstract 'is_literal_value';
 
 plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_pg')
   unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_pg');
@@ -248,7 +249,7 @@ for my $use_insert_returning ($test_server_supports_insert_returning
     lives_ok {
       is_deeply (
         $arr_rs->search({ arrayfield => { '=' => { -value => [3,4] }} })->first->arrayfield,
-        [3,4],,
+        [3,4],
         'Array value matches explicit equal'
       );
     } 'searching by arrayref (explicit equal sign)';
@@ -287,11 +288,14 @@ for my $use_insert_returning ($test_server_supports_insert_returning
     } 'find by arrayref (equal)';
 
     # test inferred condition for creation
-    TODO: for my $cond (
+    for my $cond (
       { -value => [3,4] },
       \[ '= ?' => [arrayfield => [3, 4]] ],
     ) {
-      local $TODO = 'No introspection of complex conditions :(';
+      local $TODO = 'No introspection of complex literal conditions :('
+        if is_literal_value $cond;
+
+
       my $arr_rs_cond = $arr_rs->search({ arrayfield => $cond });
 
       my $row = $arr_rs_cond->create({});