From d66f8fa337c023b69a21933e3c8f714b917fbc97 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 19 Oct 2007 01:36:09 +0000 Subject: [PATCH] Add a new test for coverage of isInGroup with a non-existant group --- t/User.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/User.t b/t/User.t index 93771ca29..7c4f40caf 100644 --- a/t/User.t +++ b/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]);