Add a new test for coverage of isInGroup with a non-existant group
This commit is contained in:
parent
c710389e9b
commit
d66f8fa337
1 changed files with 4 additions and 1 deletions
5
t/User.t
5
t/User.t
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue