One LdapError-class => Specific errors for every exception.
This commit is contained in:
parent
8a182675f4
commit
7438a2ab45
5 changed files with 62 additions and 35 deletions
|
@ -9,11 +9,11 @@ class TestFilter < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_invalid_filter_string
|
||||
assert_raises(Net::LDAP::LdapError) { Filter.from_rfc2254("") }
|
||||
assert_raises(Net::LDAP::FilterSyntaxInvalidError) { Filter.from_rfc2254("") }
|
||||
end
|
||||
|
||||
def test_invalid_filter
|
||||
assert_raises(Net::LDAP::LdapError) {
|
||||
assert_raises(Net::LDAP::OperatorError) {
|
||||
# This test exists to prove that our constructor blocks unknown filter
|
||||
# types. All filters must be constructed using helpers.
|
||||
Filter.__send__(:new, :xx, nil, nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue