Change tests to use the automatic backup of Settings in END blocks.
This commit is contained in:
parent
6f3aae261b
commit
4e78593395
23 changed files with 13 additions and 93 deletions
|
|
@ -37,11 +37,10 @@ BEGIN {
|
|||
}
|
||||
|
||||
# See if we have an SMTP server to use
|
||||
my ( $smtpd, %oldSettings );
|
||||
my ( $smtpd );
|
||||
my $SMTP_HOST = 'localhost';
|
||||
my $SMTP_PORT = '54921';
|
||||
if ($hasServer) {
|
||||
$oldSettings{ smtpServer } = $session->setting->get('smtpServer');
|
||||
$session->setting->set( 'smtpServer', $SMTP_HOST . ':' . $SMTP_PORT );
|
||||
|
||||
}
|
||||
|
|
@ -174,9 +173,6 @@ SKIP: {
|
|||
#----------------------------------------------------------------------------
|
||||
# Cleanup
|
||||
END {
|
||||
for my $name ( keys %oldSettings ) {
|
||||
$session->setting->set( $name, $oldSettings{ $name } );
|
||||
}
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue