Sha256: 380ce7ea957559ae84193d3b0f628fb3c0addd992d3c5af77ce4546f0ae20c7b
Contents?: true
Size: 1.56 KB
Versions: 11
Compression:
Stored size: 1.56 KB
Contents
require_relative '../test_helper' # NOTE: These tests depend on the OpenLDAP retcode overlay. # See: section 12.12 http://www.openldap.org/doc/admin24/overlays.html class TestReturnCodeIntegration < LDAPIntegrationTestCase def test_operations_error refute @ldap.search(filter: "cn=operationsError", base: "ou=Retcodes,dc=rubyldap,dc=com") assert result = @ldap.get_operation_result assert_equal Net::LDAP::ResultCodeOperationsError, result.code assert_equal Net::LDAP::ResultStrings[Net::LDAP::ResultCodeOperationsError], result.message end def test_protocol_error refute @ldap.search(filter: "cn=protocolError", base: "ou=Retcodes,dc=rubyldap,dc=com") assert result = @ldap.get_operation_result assert_equal Net::LDAP::ResultCodeProtocolError, result.code assert_equal Net::LDAP::ResultStrings[Net::LDAP::ResultCodeProtocolError], result.message end def test_time_limit_exceeded assert @ldap.search(filter: "cn=timeLimitExceeded", base: "ou=Retcodes,dc=rubyldap,dc=com") assert result = @ldap.get_operation_result assert_equal Net::LDAP::ResultCodeTimeLimitExceeded, result.code assert_equal Net::LDAP::ResultStrings[Net::LDAP::ResultCodeTimeLimitExceeded], result.message end def test_size_limit_exceeded assert @ldap.search(filter: "cn=sizeLimitExceeded", base: "ou=Retcodes,dc=rubyldap,dc=com") assert result = @ldap.get_operation_result assert_equal Net::LDAP::ResultCodeSizeLimitExceeded, result.code assert_equal Net::LDAP::ResultStrings[Net::LDAP::ResultCodeSizeLimitExceeded], result.message end end
Version data entries
11 entries across 11 versions & 1 rubygems