From 0be1193574975266202132ca70e59570447c569d Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 24 Jul 2006 05:03:28 +0000 Subject: [PATCH] adding test for id returned from calling find with a non-existant group name --- t/Group.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/Group.t b/t/Group.t index bd4174e9e..edd1b9768 100644 --- a/t/Group.t +++ b/t/Group.t @@ -75,7 +75,7 @@ my @ipTests = ( ); -plan tests => (119 + scalar(@scratchTests) + scalar(@ipTests)); # increment this value for each test you create +plan tests => (121 + scalar(@scratchTests) + scalar(@ipTests)); # increment this value for each test you create my $session = WebGUI::Test->session; my $testCache = WebGUI::Cache->new($session, 'myTestKey'); @@ -130,6 +130,11 @@ SKIP: { } undef $g2; +$g2 = WebGUI::Group->find($session, 'Non existant group name'); +is(ref $g2, 'WebGUI::Group', 'find with non-existant group name returns a group'); +is($g2->getId, undef, 'find with non-existant group name returns a group with undefined ID'); + + delete $g->{_group}; ok( !exists $g->{_group}, 'deleted group property hash'); is( $g->name, $gname, 'group name restored after ->get through ->name');