Skip to content

Commit fbacb5f

Browse files
author
blackhedd
committed
started an attribute test
1 parent 8920805 commit fbacb5f

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

tests/testldap.rb

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
class TestLdapClient < Test::Unit::TestCase
1616

17+
# TODO: these tests crash and burn if the associated
18+
# LDAP testserver isn't up and running.
19+
1720
def setup
1821
@host = "127.0.0.1"
1922
@port = 3890
@@ -53,13 +56,36 @@ def test_search
5356
assert_equal( 0, ldap.search( search ))
5457

5558
ldap.search( search ) {|res|
56-
p res
59+
# STUB.
60+
#p res
5761
}
62+
end
5863

5964

65+
def test_search_attributes
66+
ldap = Net::LDAP.new :host => @host, :port => @port, :auth => @auth
67+
assert_equal( 0, ldap.bind )
68+
69+
search = {
70+
:base => "dc=bigdomain,dc=com",
71+
:attributes => ["mail"]
72+
}
73+
assert_equal( 0, ldap.search( search ))
74+
75+
ldap.search( search ) {|res|
76+
# STUB.
77+
p res
78+
}
6079
end
6180

6281

82+
def test_search_filters
83+
end
84+
85+
86+
87+
88+
6389
end
6490

6591

0 commit comments

Comments
 (0)