From 22665cbdf300dc53e920c9aa2db5e50de546271f Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sat, 4 Apr 2009 02:33:33 +0000 Subject: [PATCH] Add a few tests for Group coverage. --- t/Group.t | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/t/Group.t b/t/Group.t index 5672cc790..d7de8c688 100644 --- a/t/Group.t +++ b/t/Group.t @@ -75,7 +75,7 @@ my @ipTests = ( ); -plan tests => (144 + scalar(@scratchTests) + scalar(@ipTests)); # increment this value for each test you create +plan tests => (147 + scalar(@scratchTests) + scalar(@ipTests)); # increment this value for each test you create my $session = WebGUI::Test->session; my $testCache = WebGUI::Cache->new($session, 'myTestKey'); @@ -143,6 +143,22 @@ is($g->dbQuery(), 'select userId from someOtherDatabase', 'dbQuery set and get c $g->isAdHocMailGroup(1); is($g->isAdHocMailGroup(), 1, 'isAdHocMailGroup set and get correctly'); +$g->databaseLinkId('newDbLinkId'); +is($g->databaseLinkId(), 'newDbLinkId', 'databaseLinkId set and get correctly'); +$g->databaseLinkId(0); +is($g->databaseLinkId(), 0, 'databaseLinkId set and get correctly (0)'); + +################################################################ +# +# options for new +# +################################################################ + +my $optionGroup = WebGUI::Group->new($session, 'new', undef, 'noAdmin'); +my $getGroupsIn = $optionGroup->getGroupsIn(); +cmp_deeply($getGroupsIn, [], 'new: noAdmin prevents the admin group from being added to this group'); +$optionGroup->delete; + ################################################################ # # LDAP specific group properties