Implemented Net::LDAP::open

This commit is contained in:
blackhedd 2006-04-18 21:11:33 +00:00
parent 36526cd66a
commit 4bc667ffb2
2 changed files with 28 additions and 10 deletions

View file

@ -154,8 +154,22 @@ class TestLdapClient < Test::Unit::TestCase
def test_open
Net::LDAP.open( :host => @host, :port => @port, :auth => @auth ) {
p "NO TESTS!!!"
ldap = Net::LDAP.new :host => @host, :port => @port, :auth => @auth
ldap.open {|ldap|
10.times {
rc = ldap.search( :base => "dc=bayshorenetworks,dc=com" )
assert_equal( 0, rc )
}
}
end
def test_ldap_open
Net::LDAP.open( :host => @host, :port => @port, :auth => @auth ) {|ldap|
10.times {
rc = ldap.search( :base => "dc=bayshorenetworks,dc=com" )
assert_equal( 0, rc )
}
}
end