{ -ident => undef } makes zero sense
[dbsrgits/SQL-Abstract.git] / t / 21op_ident.t
index 5ba3f27..29ff46f 100644 (file)
@@ -2,6 +2,7 @@ use strict;
 use warnings;
 
 use Test::More;
+use Test::Exception;
 use SQL::Abstract;
 use SQL::Abstract::Test import => [qw/is_same_sql_bind/];
 
@@ -12,6 +13,10 @@ for my $q ('', '"') {
     name_sep => $q ? '.' : '',
   );
 
+  throws_ok {
+    $sql_maker->where({ foo => { -ident => undef } })
+  } qr/-ident requires a single plain scalar argument/;
+
   my ($sql, @bind) = $sql_maker->select ('artist', '*', { 'artist.name' => { -ident => 'artist.pseudonym' } } );
   is_same_sql_bind (
     $sql,