mirror of
				https://github.com/nitnelave/lldap.git
				synced 2023-04-12 14:25:13 +00:00 
			
		
		
		
	ldap: test message handler
This commit is contained in:
		
							parent
							
								
									656edc3763
								
							
						
					
					
						commit
						f192f9d0f4
					
				@ -770,13 +770,21 @@ mod tests {
 | 
			
		||||
        let mut ldap_handler =
 | 
			
		||||
            LdapHandler::new(mock, "dc=example,dc=com".to_string(), "test".to_string());
 | 
			
		||||
 | 
			
		||||
        let request = LdapBindRequest {
 | 
			
		||||
        let request = LdapOp::BindRequest(LdapBindRequest {
 | 
			
		||||
            dn: "cn=bob,ou=people,dc=example,dc=com".to_string(),
 | 
			
		||||
            cred: LdapBindCred::Simple("pass".to_string()),
 | 
			
		||||
        };
 | 
			
		||||
        });
 | 
			
		||||
        assert_eq!(
 | 
			
		||||
            ldap_handler.do_bind(&request).await.0,
 | 
			
		||||
            LdapResultCode::Success
 | 
			
		||||
            ldap_handler.handle_ldap_message(request).await,
 | 
			
		||||
            Some(vec![LdapOp::BindResponse(LdapBindResponse {
 | 
			
		||||
                res: LdapResult {
 | 
			
		||||
                    code: LdapResultCode::Success,
 | 
			
		||||
                    matcheddn: "".to_string(),
 | 
			
		||||
                    message: "".to_string(),
 | 
			
		||||
                    referral: vec![],
 | 
			
		||||
                },
 | 
			
		||||
                saslcreds: None,
 | 
			
		||||
            })]),
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user