Skip to content

Commit f1e208c

Browse files
author
Jerry Cheung
committed
test search timeout parameter
@mtodd is this a stupid test? The logic in Connection#search handles both writing the request and reading the response, making it really difficult to stub out.
1 parent 908eb57 commit f1e208c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/integration/test_search.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,13 @@ def test_search_without_result
2424
assert result
2525
refute_equal entries, result
2626
end
27+
28+
def test_search_timeout
29+
events = @service.subscribe "search.net_ldap_connection"
30+
31+
@ldap.search(:timeout => 1)
32+
33+
payload, result = events.pop
34+
assert_equal 1, payload[:timelimit]
35+
end
2736
end

0 commit comments

Comments
 (0)