From bbd17516e8439a53b3075b0782fdfc7de3a365a3 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sat, 15 Apr 2006 02:36:52 +0000 Subject: [PATCH] add cache clearing to end of User and Group tests, too --- t/Group.t | 4 +++- t/User.t | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/t/Group.t b/t/Group.t index 886c7df46..9ec17ff0c 100644 --- a/t/Group.t +++ b/t/Group.t @@ -78,7 +78,8 @@ my @ipTests = ( plan tests => (88 + scalar(@scratchTests) + scalar(@ipTests)); # increment this value for each test you create my $session = WebGUI::Test->session; -WebGUI::Cache->new($session, 'myKey')->flush(); +my testCache = WebGUI::Cache->new($session, 'myTestKey'); +$testCache->flush; my $g = WebGUI::Group->new($session, "new"); @@ -490,4 +491,5 @@ END { $subSession->db->write("DELETE FROM userSessionScratch WHERE sessionId=?",[ $subSession->getId]); $subSession->close() if (defined $subSession and ref $subSession eq 'WebGUI::Session'); } + $testCache->flush; } diff --git a/t/User.t b/t/User.t index 6736acaac..bc815e1dc 100644 --- a/t/User.t +++ b/t/User.t @@ -22,7 +22,8 @@ use Test::More tests => 85; # increment this value for each test you create my $session = WebGUI::Test->session; -WebGUI::Cache->new($session, 'myKey')->flush(); +my testCache = WebGUI::Cache->new($session, 'myTestKey'); +$testCache->flush; my $user; my $lastUpdate; @@ -307,5 +308,6 @@ ok($visitor->isInGroup(7), "Visitor added back to group Everyone"); END { (defined $user and ref $user eq 'WebGUI::User') and $user->delete; + $testCache->flush; }