adding test for id returned from calling find with a non-existant group name

This commit is contained in:
Colin Kuskie 2006-07-24 05:03:28 +00:00
parent cfea8f573a
commit 0be1193574

View file

@ -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');