add cache clearing to end of User and Group tests, too
This commit is contained in:
parent
1c6fec6695
commit
bbd17516e8
2 changed files with 6 additions and 2 deletions
|
|
@ -78,7 +78,8 @@ my @ipTests = (
|
||||||
plan tests => (88 + scalar(@scratchTests) + scalar(@ipTests)); # increment this value for each test you create
|
plan tests => (88 + scalar(@scratchTests) + scalar(@ipTests)); # increment this value for each test you create
|
||||||
|
|
||||||
my $session = WebGUI::Test->session;
|
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");
|
my $g = WebGUI::Group->new($session, "new");
|
||||||
|
|
||||||
|
|
@ -490,4 +491,5 @@ END {
|
||||||
$subSession->db->write("DELETE FROM userSessionScratch WHERE sessionId=?",[ $subSession->getId]);
|
$subSession->db->write("DELETE FROM userSessionScratch WHERE sessionId=?",[ $subSession->getId]);
|
||||||
$subSession->close() if (defined $subSession and ref $subSession eq 'WebGUI::Session');
|
$subSession->close() if (defined $subSession and ref $subSession eq 'WebGUI::Session');
|
||||||
}
|
}
|
||||||
|
$testCache->flush;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
t/User.t
4
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;
|
my $session = WebGUI::Test->session;
|
||||||
|
|
||||||
WebGUI::Cache->new($session, 'myKey')->flush();
|
my testCache = WebGUI::Cache->new($session, 'myTestKey');
|
||||||
|
$testCache->flush;
|
||||||
|
|
||||||
my $user;
|
my $user;
|
||||||
my $lastUpdate;
|
my $lastUpdate;
|
||||||
|
|
@ -307,5 +308,6 @@ ok($visitor->isInGroup(7), "Visitor added back to group Everyone");
|
||||||
|
|
||||||
END {
|
END {
|
||||||
(defined $user and ref $user eq 'WebGUI::User') and $user->delete;
|
(defined $user and ref $user eq 'WebGUI::User') and $user->delete;
|
||||||
|
$testCache->flush;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue