More END block cleanups.

This commit is contained in:
Colin Kuskie 2010-06-07 19:07:45 -07:00
parent 8a62abc3ef
commit 7034e2cf57
10 changed files with 25 additions and 64 deletions

View file

@ -74,6 +74,7 @@ my $workflow = WebGUI::Workflow->create($session,
mode => 'realtime',
},
);
WebGUI::Test->addToCleanup($workflow);
my $icalFetch = $workflow->addActivity('WebGUI::Workflow::Activity::CalendarUpdateFeeds');
my $instance1 = WebGUI::Workflow::Instance->create($session,
@ -127,8 +128,4 @@ is(scalar @{ $newEvents }, 1, 'reimport does not create new children');
$anniversary = pop @{ $newEvents };
is($anniversary->get('description'), $party->get('description'), '... description, checks for line unwrapping');
END {
$instance1 && $instance1->delete('skipNotify');
$instance2 && $instance2->delete('skipNotify');
$workflow && $workflow->delete;
}
#vim:ft=perl

View file

@ -30,6 +30,7 @@ my $workflow = WebGUI::Workflow->create($session,
mode => 'realtime',
},
);
WebGUI::Test->addToCleanup($workflow);
my $activity = $workflow->addActivity('WebGUI::Workflow::Activity::DeleteExpiredSessions');
my $instance1 = WebGUI::Workflow::Instance->create($session,
@ -113,6 +114,4 @@ foreach my $testSession (@sessions) {
## Make sure that one scratch session was deleted and the other kept.
## Close and end all four sessions
END {
$workflow->delete;
}
#vim:ft=perl

View file

@ -158,7 +158,4 @@ is($session->db->quickScalar('select count(*) from Survey_response where Survey_
# Afterwards, back to no incomplete responses
is( scalar $session->db->buildArray($SQL), 0, 'Afterwards, back to no incomplete responses');
END {
$session->db->write('delete from Survey_response where userId = ?', [$user->userId]) if $user;
$survey->purge if $survey;
}
#vim:ft=perl

View file

@ -143,9 +143,4 @@ $post2mock->set_always('getId', $post2_id);
WebGUI::Test->unmockAssetId($post_id);
}
#----------------------------------------------------------------------------
# Cleanup
END {
}
#vim:ft=perl

View file

@ -112,9 +112,4 @@ sub createInstance {
#----------------------------------------------------------------------------
# Cleanup
END {
}
#vim:ft=perl