[Catalyst-commits] r6597 - in trunk/Catalyst-Model-LDAP: . t
dwc at dev.catalyst.perl.org
dwc at dev.catalyst.perl.org
Sat Jul 28 01:16:43 GMT 2007
Author: dwc
Date: 2007-07-28 01:16:42 +0100 (Sat, 28 Jul 2007)
New Revision: 6597
Added:
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
Removed:
trunk/Catalyst-Model-LDAP/t/unit_bind.t
trunk/Catalyst-Model-LDAP/t/unit_search.t
trunk/Catalyst-Model-LDAP/t/unit_search_limit.t
Modified:
trunk/Catalyst-Model-LDAP/Changes
Log:
Reorganize tests a little
Modified: trunk/Catalyst-Model-LDAP/Changes
===================================================================
--- trunk/Catalyst-Model-LDAP/Changes 2007-07-28 00:14:17 UTC (rev 6596)
+++ trunk/Catalyst-Model-LDAP/Changes 2007-07-28 00:16:42 UTC (rev 6597)
@@ -2,6 +2,7 @@
0.16
- Fix Catalyst::Model::LDAP::Entry's constructor
+ - Reorganize tests a little
0.15 Fri Feb 23 11:37:25 EST 2007
- Throw runtime require errors
Copied: trunk/Catalyst-Model-LDAP/t/unit_Connection_bind.t (from rev 6047, trunk/Catalyst-Model-LDAP/t/unit_bind.t)
===================================================================
--- trunk/Catalyst-Model-LDAP/t/unit_Connection_bind.t (rev 0)
+++ trunk/Catalyst-Model-LDAP/t/unit_Connection_bind.t 2007-07-28 00:16:42 UTC (rev 6597)
@@ -0,0 +1,31 @@
+use strict;
+use warnings;
+use Catalyst::Model::LDAP::Connection;
+use Test::More;
+
+plan skip_all => 'set LDAP_TEST_LIVE, LDAP_BINDDN, and LDAP_PASSWORD to enable this test'
+ unless $ENV{LDAP_TEST_LIVE} and $ENV{LDAP_BINDDN} and $ENV{LDAP_PASSWORD};
+plan tests => 7;
+
+my $UID = 'dwc';
+
+my $ldap = Catalyst::Model::LDAP::Connection->new(
+ host => 'ldap.ufl.edu',
+ base => 'ou=People,dc=ufl,dc=edu',
+);
+ok($ldap, 'created connection');
+
+$ldap->bind(
+ dn => $ENV{LDAP_BINDDN},
+ password => $ENV{LDAP_PASSWORD},
+);
+
+my $mesg = $ldap->search("(uid=$UID)");
+
+isa_ok($mesg, 'Catalyst::Model::LDAP::Search');
+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');
Copied: trunk/Catalyst-Model-LDAP/t/unit_Connection_search.t (from rev 6047, trunk/Catalyst-Model-LDAP/t/unit_search.t)
===================================================================
--- trunk/Catalyst-Model-LDAP/t/unit_Connection_search.t (rev 0)
+++ trunk/Catalyst-Model-LDAP/t/unit_Connection_search.t 2007-07-28 00:16:42 UTC (rev 6597)
@@ -0,0 +1,25 @@
+use strict;
+use warnings;
+use Catalyst::Model::LDAP::Connection;
+use Test::More;
+
+plan skip_all => 'set LDAP_TEST_LIVE to enable this test' unless $ENV{LDAP_TEST_LIVE};
+plan tests => 7;
+
+my $SN = 'TEST';
+
+my $ldap = Catalyst::Model::LDAP::Connection->new(
+ host => 'ldap.ufl.edu',
+ base => 'ou=People,dc=ufl,dc=edu',
+);
+ok($ldap, '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');
Copied: trunk/Catalyst-Model-LDAP/t/unit_Connection_search_limit.t (from rev 6047, trunk/Catalyst-Model-LDAP/t/unit_search_limit.t)
===================================================================
--- trunk/Catalyst-Model-LDAP/t/unit_Connection_search_limit.t (rev 0)
+++ trunk/Catalyst-Model-LDAP/t/unit_Connection_search_limit.t 2007-07-28 00:16:42 UTC (rev 6597)
@@ -0,0 +1,30 @@
+use strict;
+use warnings;
+use Catalyst::Model::LDAP::Connection;
+use Net::LDAP::Constant qw/LDAP_SIZELIMIT_EXCEEDED/;
+use Test::More;
+
+plan skip_all => 'set LDAP_TEST_LIVE to enable this test' unless $ENV{LDAP_TEST_LIVE};
+plan tests => 7;
+
+my $SIZELIMIT = 2;
+my $SN = 'SMITH';
+
+my $ldap = Catalyst::Model::LDAP::Connection->new(
+ host => 'ldap.ufl.edu',
+ base => 'ou=People,dc=ufl,dc=edu',
+ options => {
+ sizelimit => $SIZELIMIT,
+ },
+);
+ok($ldap, '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');
Deleted: trunk/Catalyst-Model-LDAP/t/unit_bind.t
===================================================================
--- trunk/Catalyst-Model-LDAP/t/unit_bind.t 2007-07-28 00:14:17 UTC (rev 6596)
+++ trunk/Catalyst-Model-LDAP/t/unit_bind.t 2007-07-28 00:16:42 UTC (rev 6597)
@@ -1,31 +0,0 @@
-use strict;
-use warnings;
-use Catalyst::Model::LDAP::Connection;
-use Test::More;
-
-plan skip_all => 'set LDAP_TEST_LIVE, LDAP_BINDDN, and LDAP_PASSWORD to enable this test'
- unless $ENV{LDAP_TEST_LIVE} and $ENV{LDAP_BINDDN} and $ENV{LDAP_PASSWORD};
-plan tests => 7;
-
-my $UID = 'dwc';
-
-my $ldap = Catalyst::Model::LDAP::Connection->new(
- host => 'ldap.ufl.edu',
- base => 'ou=People,dc=ufl,dc=edu',
-);
-ok($ldap, 'created connection');
-
-$ldap->bind(
- dn => $ENV{LDAP_BINDDN},
- password => $ENV{LDAP_PASSWORD},
-);
-
-my $mesg = $ldap->search("(uid=$UID)");
-
-isa_ok($mesg, 'Catalyst::Model::LDAP::Search');
-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');
Deleted: trunk/Catalyst-Model-LDAP/t/unit_search.t
===================================================================
--- trunk/Catalyst-Model-LDAP/t/unit_search.t 2007-07-28 00:14:17 UTC (rev 6596)
+++ trunk/Catalyst-Model-LDAP/t/unit_search.t 2007-07-28 00:16:42 UTC (rev 6597)
@@ -1,25 +0,0 @@
-use strict;
-use warnings;
-use Catalyst::Model::LDAP::Connection;
-use Test::More;
-
-plan skip_all => 'set LDAP_TEST_LIVE to enable this test' unless $ENV{LDAP_TEST_LIVE};
-plan tests => 7;
-
-my $SN = 'TEST';
-
-my $ldap = Catalyst::Model::LDAP::Connection->new(
- host => 'ldap.ufl.edu',
- base => 'ou=People,dc=ufl,dc=edu',
-);
-ok($ldap, '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');
Deleted: trunk/Catalyst-Model-LDAP/t/unit_search_limit.t
===================================================================
--- trunk/Catalyst-Model-LDAP/t/unit_search_limit.t 2007-07-28 00:14:17 UTC (rev 6596)
+++ trunk/Catalyst-Model-LDAP/t/unit_search_limit.t 2007-07-28 00:16:42 UTC (rev 6597)
@@ -1,30 +0,0 @@
-use strict;
-use warnings;
-use Catalyst::Model::LDAP::Connection;
-use Net::LDAP::Constant qw/LDAP_SIZELIMIT_EXCEEDED/;
-use Test::More;
-
-plan skip_all => 'set LDAP_TEST_LIVE to enable this test' unless $ENV{LDAP_TEST_LIVE};
-plan tests => 7;
-
-my $SIZELIMIT = 2;
-my $SN = 'SMITH';
-
-my $ldap = Catalyst::Model::LDAP::Connection->new(
- host => 'ldap.ufl.edu',
- base => 'ou=People,dc=ufl,dc=edu',
- options => {
- sizelimit => $SIZELIMIT,
- },
-);
-ok($ldap, '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');
More information about the Catalyst-commits
mailing list