[Catalyst-commits] r6598 - trunk/Catalyst-Model-LDAP/t

dwc at dev.catalyst.perl.org dwc at dev.catalyst.perl.org
Sat Jul 28 01:27:43 GMT 2007


Author: dwc
Date: 2007-07-28 01:27:43 +0100 (Sat, 28 Jul 2007)
New Revision: 6598

Modified:
   trunk/Catalyst-Model-LDAP/t/unit_Connection_bind.t
   trunk/Catalyst-Model-LDAP/t/unit_Connection_search.t
   trunk/Catalyst-Model-LDAP/t/unit_Connection_search_limit.t
Log:
Clean up ::Connection tests

Modified: trunk/Catalyst-Model-LDAP/t/unit_Connection_bind.t
===================================================================
--- trunk/Catalyst-Model-LDAP/t/unit_Connection_bind.t	2007-07-28 00:16:42 UTC (rev 6597)
+++ trunk/Catalyst-Model-LDAP/t/unit_Connection_bind.t	2007-07-28 00:27:43 UTC (rev 6598)
@@ -13,7 +13,7 @@
     host => 'ldap.ufl.edu',
     base => 'ou=People,dc=ufl,dc=edu',
 );
-ok($ldap, 'created connection');
+isa_ok($ldap, 'Catalyst::Model::LDAP::Connection', 'created connection');
 
 $ldap->bind(
     dn       => $ENV{LDAP_BINDDN},
@@ -26,6 +26,7 @@
 ok(! $mesg->is_error, 'server response okay');
 is($mesg->count, 1, 'got one entry');
 
-isa_ok($mesg->entry(0), 'Catalyst::Model::LDAP::Entry');
-is($mesg->entry(0)->get_value('uid'), $UID, 'entry uid matches');
-is($mesg->entry(0)->uid, $UID, 'entry uid via AUTOLOAD matches');
+my $entry = $mesg->entry(0);
+isa_ok($entry, 'Catalyst::Model::LDAP::Entry');
+is($entry->get_value('uid'), $UID, 'entry uid matches');
+is($entry->uid, $UID, 'entry uid via AUTOLOAD matches');

Modified: trunk/Catalyst-Model-LDAP/t/unit_Connection_search.t
===================================================================
--- trunk/Catalyst-Model-LDAP/t/unit_Connection_search.t	2007-07-28 00:16:42 UTC (rev 6597)
+++ trunk/Catalyst-Model-LDAP/t/unit_Connection_search.t	2007-07-28 00:27:43 UTC (rev 6598)
@@ -12,14 +12,16 @@
     host => 'ldap.ufl.edu',
     base => 'ou=People,dc=ufl,dc=edu',
 );
-ok($ldap, 'created connection');
 
+isa_ok($ldap, 'Catalyst::Model::LDAP::Connection', 'created connection');
+
 my $mesg = $ldap->search("(sn=$SN)");
 
 isa_ok($mesg, 'Catalyst::Model::LDAP::Search');
 ok(! $mesg->is_error, 'server response okay');
 ok($mesg->entries, 'got entries');
 
-isa_ok($mesg->entry(0), 'Catalyst::Model::LDAP::Entry');
-is($mesg->entry(0)->get_value('sn'), $SN, 'first entry sn matches');
-is($mesg->entry(0)->sn, $SN, 'first entry sn via AUTOLOAD matches');
+my $entry = $mesg->entry(0);
+isa_ok($entry, 'Catalyst::Model::LDAP::Entry');
+is($entry->get_value('sn'), $SN, 'first entry sn matches');
+is($entry->sn, $SN, 'first entry sn via AUTOLOAD matches');

Modified: trunk/Catalyst-Model-LDAP/t/unit_Connection_search_limit.t
===================================================================
--- trunk/Catalyst-Model-LDAP/t/unit_Connection_search_limit.t	2007-07-28 00:16:42 UTC (rev 6597)
+++ trunk/Catalyst-Model-LDAP/t/unit_Connection_search_limit.t	2007-07-28 00:27:43 UTC (rev 6598)
@@ -17,14 +17,16 @@
         sizelimit => $SIZELIMIT,
     },
 );
-ok($ldap, 'created connection');
 
+isa_ok($ldap, 'Catalyst::Model::LDAP::Connection', 'created connection');
+
 my $mesg = $ldap->search("(sn=$SN)");
 
 isa_ok($mesg, 'Catalyst::Model::LDAP::Search');
 is($mesg->code, LDAP_SIZELIMIT_EXCEEDED, 'server response okay');
 is($mesg->count, $SIZELIMIT, 'number of entries matches sizelimit');
 
-isa_ok($mesg->entry(0), 'Catalyst::Model::LDAP::Entry');
-is($mesg->entry(0)->get_value('sn'), $SN, 'entry sn matches');
-is($mesg->entry(0)->sn, $SN, 'entry sn via AUTOLOAD matches');
+my $entry = $mesg->entry(0);
+isa_ok($entry, 'Catalyst::Model::LDAP::Entry');
+is($entry->get_value('sn'), $SN, 'entry sn matches');
+is($entry->sn, $SN, 'entry sn via AUTOLOAD matches');




More information about the Catalyst-commits mailing list