[Rt-commit] rt branch, 4.0-trunk, updated. rt-4.0.4-143-gce07e84
Alex Vandiver
alexmv at bestpractical.com
Tue Dec 13 18:09:13 EST 2011
The branch, 4.0-trunk has been updated
via ce07e8493fb93dd84a64323a131adae0310482a5 (commit)
from f88d29d82e26f3147b8cf5abf18b970423f5bbe2 (commit)
Summary of changes:
t/web/offline.t | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit ce07e8493fb93dd84a64323a131adae0310482a5
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Dec 13 18:09:03 2011 -0500
Ensure proper cleanup of $m by not closing over it in create_ticket_offline
This prevents warnings during global destruction when we try to test for
server-side warnings cleanliness.
diff --git a/t/web/offline.t b/t/web/offline.t
index 111f5f6..b3762fc 100644
--- a/t/web/offline.t
+++ b/t/web/offline.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use RT::Test tests => 18;
+use RT::Test tests => 20;
my ( $url, $m ) = RT::Test->started_ok;
ok( $m->login, 'logged in' );
@@ -14,7 +14,7 @@ Queue: General
Subject: test
Status: new
EOF
- my $ticket = create_ticket_offline( $template );
+ my $ticket = create_ticket_offline( $m, $template );
ok $ticket->id, 'created a ticket with offline tool';
is $ticket->QueueObj->Name, 'General', 'correct value';
is $ticket->Subject, 'test', 'correct value';
@@ -29,7 +29,7 @@ Subject: test
Status: new
Requestor: test at example.com
EOF
- my $ticket = create_ticket_offline( $template );
+ my $ticket = create_ticket_offline( $m, $template );
ok $ticket->id, 'created a ticket with offline tool';
is $ticket->RequestorAddresses, 'test at example.com', 'correct value';
}
@@ -47,7 +47,7 @@ Status: new
Requestor: test at example.com
RequestorGroup: test
EOF
- my $ticket = create_ticket_offline( $template );
+ my $ticket = create_ticket_offline( $m, $template );
ok $ticket->id, 'created a ticket with offline tool';
ok grep(
{ $_->MemberId eq $group->id }
@@ -57,7 +57,7 @@ EOF
}
sub create_ticket_offline {
- my $template = shift;
+ my ($m, $template) = @_;
$m->get_ok( $url . '/Tools/Offline.html' );
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list