From 8f687d8aa506d607080471f8b842d581809c9019 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 1 Apr 2011 15:13:16 -0700 Subject: [PATCH] Write a test to make sure Group->new returns undef for non-existant groupIds. --- t/Group.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/Group.t b/t/Group.t index 9becd08c7..ac451395d 100644 --- a/t/Group.t +++ b/t/Group.t @@ -93,7 +93,7 @@ my @ldapTests = ( ); -plan tests => (172 + (scalar(@scratchTests) * 2) + scalar(@ipTests)); # increment this value for each test you create +plan tests => (173 + (scalar(@scratchTests) * 2) + scalar(@ipTests)); # increment this value for each test you create my $session = WebGUI::Test->session; my $testCache = WebGUI::Cache->new($session, 'myTestKey'); @@ -124,6 +124,8 @@ foreach my $gid ('new', '') { $g->delete; } +is(WebGUI::Group->new($session, 'neverAGroupId'), undef, 'calling new with a non-existant groupId returns undef'); + my $g = WebGUI::Group->new($session, "new"); $g->description('I am really a montage');