From fbacb5f8e06845dedbbad1ba99eaf0eaa2f6f5d0 Mon Sep 17 00:00:00 2001 From: blackhedd Date: Sun, 16 Apr 2006 11:10:17 +0000 Subject: [PATCH] started an attribute test --- tests/testldap.rb | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tests/testldap.rb b/tests/testldap.rb index abffc6b..fc9f65f 100644 --- a/tests/testldap.rb +++ b/tests/testldap.rb @@ -14,6 +14,9 @@ require 'stringio' class TestLdapClient < Test::Unit::TestCase + # TODO: these tests crash and burn if the associated + # LDAP testserver isn't up and running. + def setup @host = "127.0.0.1" @port = 3890 @@ -53,13 +56,36 @@ class TestLdapClient < Test::Unit::TestCase assert_equal( 0, ldap.search( search )) ldap.search( search ) {|res| - p res + # STUB. + #p res } + end + def test_search_attributes + ldap = Net::LDAP.new :host => @host, :port => @port, :auth => @auth + assert_equal( 0, ldap.bind ) + + search = { + :base => "dc=bigdomain,dc=com", + :attributes => ["mail"] + } + assert_equal( 0, ldap.search( search )) + + ldap.search( search ) {|res| + # STUB. + p res + } end + def test_search_filters + end + + + + + end