fixes for deleting ship drivers created during testing
This commit is contained in:
parent
6e9031de4a
commit
be29a09114
2 changed files with 10 additions and 9 deletions
|
|
@ -31,7 +31,7 @@ my $session = WebGUI::Test->session;
|
|||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
||||
my $tests = 35;
|
||||
my $tests = 36;
|
||||
plan tests => 1 + $tests;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
@ -341,12 +341,13 @@ cmp_deeply(
|
|||
#
|
||||
#######################################################################
|
||||
|
||||
#$driver->delete;
|
||||
#
|
||||
#my $count = $session->db->quickScalar('select count(*) from shipper where shipperId=?',[$driver->shipperId]);
|
||||
#is($count, 0, 'delete deleted the object');
|
||||
#
|
||||
#undef $driver;
|
||||
my $driverId = $driver->getId;
|
||||
$driver->delete;
|
||||
|
||||
my $count = $session->db->quickScalar('select count(*) from shipper where shipperId=?',[$driverId]);
|
||||
is($count, 0, 'delete deleted the object');
|
||||
|
||||
undef $driver;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -354,5 +355,4 @@ cmp_deeply(
|
|||
#----------------------------------------------------------------------------
|
||||
# Cleanup
|
||||
END {
|
||||
#$session->db->write('delete from shipper');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,9 +234,10 @@ cmp_deeply(
|
|||
#
|
||||
#######################################################################
|
||||
|
||||
my $driverId = $driver->getId;
|
||||
$driver->delete;
|
||||
|
||||
my $count = $session->db->quickScalar('select count(*) from shipper where shipperId=?',[$driver->getId]);
|
||||
my $count = $session->db->quickScalar('select count(*) from shipper where shipperId=?',[$driverId]);
|
||||
is($count, 0, 'delete deleted the object');
|
||||
|
||||
undef $driver;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue