Add a new test for coverage of isInGroup with a non-existant group

This commit is contained in:
Colin Kuskie 2007-10-19 01:36:09 +00:00
parent c710389e9b
commit d66f8fa337

View file

@ -20,7 +20,7 @@ use WebGUI::Cache;
use WebGUI::User;
use WebGUI::ProfileField;
use Test::More tests => 102; # increment this value for each test you create
use Test::More tests => 103; # increment this value for each test you create
use Test::Deep;
my $session = WebGUI::Test->session;
@ -278,6 +278,9 @@ is($result, 0, 'deleteFromGroups() -- Visitor removed from Everyone group');
ok($visitor->isInGroup(1), "isInGroup: Visitor is in group Visitor, hardcoded");
ok($visitor->isInGroup(7), "isInGroup: Everyone is in group Everyone, hardcoded");
##Test for group membership in a non-existant group
ok(! $visitor->isInGroup('nonExistantGroup'), 'isInGroup: Checking for membership in a non-existant group');
##Add Visitor back to those groups
WebGUI::Group->new($session, '1')->addUsers([1]);
WebGUI::Group->new($session, '7')->addUsers([1]);