improvements to WebGUI::Test SQL cleanup

This commit is contained in:
Graham Knop 2010-06-10 08:39:00 -05:00
parent fe1ac66cca
commit 7f820d9f35

View file

@ -848,7 +848,14 @@ Example call:
},
'SQL' => sub {
my (undef, $sql) = @_;
return $CLASS->session->db->dbh->prepare($sql);
my $db = $CLASS->session->db;
my @params;
if ( ref $sql ) {
( $sql, @params ) = @$sql;
}
return sub {
$db->write( $sql, \@params );
}
},
);
@ -938,7 +945,9 @@ Example call:
'CODE' => sub {
(shift)->();
},
'SQL' => 'execute',
'SQL' => sub {
(shift)->();
},
);
sub cleanupGuard {