Skip to content

Commit a3266de

Browse files
committedNov 4, 2011
WebGUI 8 doesn't do Basic Auth, and ldap tests were moved into a different file.
1 parent 42ed112 commit a3266de

File tree

2 files changed

+0
-63
lines changed

2 files changed

+0
-63
lines changed
 

‎t/Auth/mech.t

-8
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,4 @@ $mech->submit_form_ok(
266266
);
267267
$mech->base_is( $assetUrl, "We don't get redirected" );
268268

269-
#----------------------------------------------------------------------------
270-
# HTTP basic auth
271-
$mech = Test::WWW::Mechanize->new;
272-
$mech->get( $httpAuthUrl );
273-
$mech->content_contains( "Hello, $USERNAME", "We are greeted by name" );
274-
$mech->get( $httpAuthUrl . $asset->get('url') );
275-
$mech->content_contains( "ARTICLE", "We are shown the article" );
276-
277269
done_testing;

‎t/Group.t

-55
Original file line numberDiff line numberDiff line change
@@ -155,61 +155,6 @@ my $getGroupsIn = $optionGroup->getGroupsIn();
155155
cmp_deeply($getGroupsIn, [], 'new: noAdmin prevents the admin group from being added to this group');
156156
$optionGroup->delete;
157157

158-
################################################################
159-
#
160-
# LDAP specific group properties
161-
# These tests have to be done on an isolated group that will NEVER
162-
# have getGroups called on it
163-
#
164-
################################################################
165-
166-
my $ldapProps = WebGUI::Test->getSmokeLDAPProps();
167-
$session->db->setRow('ldapLink', 'ldapLinkId', $ldapProps, $ldapProps->{ldapLinkId});
168-
my $ldap = WebGUI::LDAPLink->new($session, $ldapProps->{ldapLinkId});
169-
is($ldap->getValue("ldapLinkId"),$ldapProps->{ldapLinkId},'ldap link created properly');
170-
WebGUI::Test->addToCleanup($ldap);
171-
172-
my @shawshank;
173-
174-
foreach my $idx (0..$#ldapTests) {
175-
$shawshank[$idx] = WebGUI::User->new($session, "new");
176-
$shawshank[$idx]->username("shawshank$idx");
177-
$shawshank[$idx]->authMethod("LDAP");
178-
my $auth = $shawshank[$idx]->authInstance;
179-
$auth->saveParams($shawshank[$idx]->getId,$shawshank[$idx]->authMethod,{
180-
connectDN => $ldapTests[$idx]->{dn},
181-
ldapConnection => $ldap->getValue("ldapLinkId"),
182-
ldapUrl => $ldap->getValue("ldapUrl"),
183-
});
184-
}
185-
186-
WebGUI::Test->addToCleanup(@shawshank);
187-
188-
my $lGroup = WebGUI::Group->new($session, 'new');
189-
190-
$lGroup->ldapGroup('cn=Convicts,o=shawshank');
191-
is($lGroup->ldapGroup(), 'cn=Convicts,o=shawshank', 'ldapGroup set and fetched correctly');
192-
193-
$lGroup->ldapGroupProperty('member');
194-
is($lGroup->ldapGroupProperty(), 'member', 'ldapGroup set and fetched correctly');
195-
196-
$lGroup->ldapLinkId($ldapProps->{ldapLinkId});
197-
is($lGroup->ldapLinkId(),$ldapProps->{ldapLinkId}, 'ldapLinkId set and fetched correctly');
198-
199-
is_deeply(
200-
[ (map { $lGroup->hasLDAPUser($_->getId) } @shawshank) ],
201-
[0, 1, 1],
202-
'shawshank user 2, and 3 found in lGroup users from LDAP'
203-
);
204-
205-
$lGroup->ldapRecursiveProperty('LDAP recursive property');
206-
is($lGroup->ldapRecursiveProperty(), 'LDAP recursive property', 'ldapRecursiveProperty set and fetched correctly');
207-
208-
$lGroup->ldapRecursiveFilter('LDAP recursive filter');
209-
is($lGroup->ldapRecursiveFilter(), 'LDAP recursive filter', 'ldapRecursiveFilter set and fetched correctly');
210-
211-
$lGroup->delete;
212-
213158
my $gid = $g->getId;
214159
is (length($gid), 22, "GroupId is proper length");
215160

0 commit comments

Comments
 (0)