Changed behaviour to not stringify blessed objects, but pass them through to the...
[scpubgit/Q-Branch.git] / t / 02where.t
index b47fdf9..60cbf84 100644 (file)
@@ -6,13 +6,15 @@ use Test::More;
 use Test::Exception;
 use SQL::Abstract::Test import => ['is_same_sql_bind'];
 
-plan tests => 17;
+plan tests => 18;
 
 use SQL::Abstract;
 
 # Make sure to test the examples, since having them break is somewhat
 # embarrassing. :-(
 
+my $not_stringifiable = SQLA::NotStringifiable->new();
+
 my @handle_tests = (
     {
         where => {
@@ -188,6 +190,12 @@ my @handle_tests = (
        bind => [ 'The Life, the Universe and Everything.' ],
    },
 
+   {
+       where => { foo => $not_stringifiable, },
+       stmt => " WHERE ( foo = ? )",
+       bind => [ $not_stringifiable ],
+   },
+
 
 );
 
@@ -225,3 +233,18 @@ sub to_str
 }
 
 1;
+
+
+#======================================================================
+package SQLA::NotStringifiable; # testing stringification of arguments
+#======================================================================
+
+use strict;
+use warnings;
+
+sub new
+{
+  bless {}, shift;
+}
+
+1;