More END block cleanups.

This commit is contained in:
Colin Kuskie 2010-06-08 19:27:12 -07:00
parent 647dc6a13a
commit 83e945142e
10 changed files with 30 additions and 77 deletions

View file

@ -50,6 +50,7 @@ is($output, 'Group Not a Group was not found', 'Non-existant group returns an er
##Create a small database
$session->db->dbh->do('DROP TABLE IF EXISTS myUserTable');
$session->db->dbh->do(q!CREATE TABLE myUserTable (userId CHAR(22) binary NOT NULL default '', PRIMARY KEY(userId)) TYPE=InnoDB!);
WebGUI::Test->addToCleanup(SQL => 'DROP TABLE IF EXISTS myUserTable');
##Create a bunch of users and put them in the table.
@ -116,7 +117,4 @@ $output = join ',',
;
is($output, 'user,disti,int_disti', 'user is in all three groups');
##clean up everything
END {
$session->db->dbh->do('DROP TABLE IF EXISTS myUserTable');
}
#vim:ft=perl

View file

@ -32,6 +32,7 @@ my $WebGUIdbLink = WebGUI::DatabaseLink->new($session, '0');
my $originalMacroAccessValue = $WebGUIdbLink->macroAccessIsAllowed();
$session->db->dbh->do('DROP TABLE IF EXISTS testTable');
WebGUI::Test->addToCleanup(SQL => 'DROP TABLE testTable');
$session->db->dbh->do('CREATE TABLE testTable (zero int(8), one int(8), two int(8), three int(8), four int(8), five int(8), six int(8), seven int(8), eight int(8), nine int(8), ten int(8), eleven int(8) ) TYPE=InnoDB');
$session->db->dbh->do('INSERT INTO testTable (zero, one, two, three, four, five, six, seven, eight, nine, ten, eleven ) VALUES(0,1,2,3,4,5,6,7,8,9,10,11)');
$session->db->dbh->do('INSERT INTO testTable (zero, one, two, three, four, five, six, seven, eight, nine, ten, eleven ) VALUES(100,101,102,103,104,105,106,107,108,109,110,111)');
@ -154,6 +155,4 @@ my $output = WebGUI::Macro::SQL::process(
);
is($output, 'zero', 'alternate linkId works');
END {
$session->db->dbh->do('DROP TABLE testTable');
}
#vim:ft=perl