update User test now that group caches are flushed properly
This commit is contained in:
parent
0732eef9ce
commit
3d10acb8ce
2 changed files with 8 additions and 12 deletions
|
|
@ -18,7 +18,7 @@ use WebGUI::Storage;
|
|||
|
||||
use Test::More;
|
||||
|
||||
plan tests => 7; # increment this value for each test you create
|
||||
plan tests => 8; # increment this value for each test you create
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
|
|
@ -46,6 +46,8 @@ ok( (-e $storageDir1 and -d $storageDir1), "Storage location created and is a di
|
|||
|
||||
$storage1->delete;
|
||||
|
||||
ok( !(-e $storageDir1), "Storage location deleted");
|
||||
|
||||
END {
|
||||
ref $storage1 eq "WebGUI::Storage" and $storage1->delete;
|
||||
}
|
||||
|
|
|
|||
16
t/User.t
16
t/User.t
|
|
@ -18,7 +18,7 @@ use WebGUI::Utility;
|
|||
use WebGUI::Cache;
|
||||
|
||||
use WebGUI::User;
|
||||
use Test::More tests => 85; # increment this value for each test you create
|
||||
use Test::More tests => 81; # increment this value for each test you create
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
|
|
@ -272,16 +272,10 @@ ok($user->isInGroup(14), "New user is in group 14(Product Managers)");
|
|||
|
||||
$user->deleteFromGroups([3]);
|
||||
ok(!$user->isInGroup(3), "deleteFromGroups: New user is not in group 3(Admin)");
|
||||
ok($user->isInGroup(11), "New user still in group 11 due to caching (Secondary Admins)");
|
||||
ok($user->isInGroup(12), "New user still in group 12 due to caching (Turn On Admin)");
|
||||
ok($user->isInGroup(13), "New user still in group 13 due to caching (Export Managers)");
|
||||
ok($user->isInGroup(14), "New user still in group 14 due to caching (Product Managers)");
|
||||
|
||||
WebGUI::Cache->new($session, 'myKey')->flush();
|
||||
ok($user->isInGroup(11), "Flush cache, new user not in group 11 (Secondary Admins)");
|
||||
ok($user->isInGroup(12), "Flush cache, new user not in group 12 (Turn On Admin)");
|
||||
ok($user->isInGroup(13), "Flush cache, new user not in group 13 (Export Managers)");
|
||||
ok($user->isInGroup(14), "Flush cache, new user not in group 14 (Product Managers)");
|
||||
ok(!$user->isInGroup(11), "Flush cache, new user not in group 11 (Secondary Admins)");
|
||||
ok(!$user->isInGroup(12), "Flush cache, new user not in group 12 (Turn On Admin)");
|
||||
ok(!$user->isInGroup(13), "Flush cache, new user not in group 13 (Export Managers)");
|
||||
ok(!$user->isInGroup(14), "Flush cache, new user not in group 14 (Product Managers)");
|
||||
|
||||
$user->delete;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue