switch to plugin style
[scpubgit/Q-Branch.git] / xt / clauses.t
index 40ad007..85d002d 100644 (file)
@@ -2,13 +2,16 @@ use strict;
 use warnings;
 use Test::More;
 use SQL::Abstract::Test import => [ qw(is_same_sql_bind is_same_sql) ];
+use SQL::Abstract;
 use SQL::Abstract::ExtraClauses;
 
-my $sqlac = SQL::Abstract::ExtraClauses->new(
+my $sqlac = SQL::Abstract->new(
   unknown_unop_always_func => 1,
   lazy_join_sql_parts => 1,
 );
 
+SQL::Abstract::ExtraClauses->apply_to($sqlac);
+
 is_deeply(
   [ $sqlac->statement_list ],
   [ sort qw(select update insert delete) ],
@@ -26,8 +29,6 @@ my ($sql, @bind) = $sqlac->select({
   having => { '>' => [ { -count => 'cd.id' }, 3 ] }
 });
 
-::Dwarn([ $sql->formatter->_simplify($sql->to_array), $sql->stringify ]);
-
 is_same_sql_bind(
   $sql, \@bind,
   q{