Expand the test for packet

This commit is contained in:
moznion
2020-12-12 00:16:46 +09:00
parent 8b54927110
commit a53ca1d40c

View File

@@ -288,6 +288,10 @@ mod tests {
rfc2865::lookup_user_name(&request_packet).unwrap().unwrap(), rfc2865::lookup_user_name(&request_packet).unwrap().unwrap(),
"nemo" "nemo"
); );
assert_eq!(
rfc2865::lookup_all_user_name(&request_packet).unwrap(),
vec!["nemo"],
);
assert_eq!( assert_eq!(
rfc2865::lookup_user_password(&request_packet) rfc2865::lookup_user_password(&request_packet)
.unwrap() .unwrap()
@@ -322,6 +326,17 @@ mod tests {
true true
); );
// test removing a AVP
assert_eq!(
rfc2865::lookup_service_type(&response_packet).is_some(),
true
);
rfc2865::delete_service_type(&mut response_packet);
assert_eq!(
rfc2865::lookup_service_type(&response_packet).is_some(),
false
);
Ok(()) Ok(())
} }