This commit is contained in:
John Smith
2022-08-04 20:21:03 -04:00
parent 0106f682f7
commit 9b0ab866f1
7 changed files with 179 additions and 127 deletions

View File

@@ -85,8 +85,9 @@ pub async fn test_add_get_remove() {
assert_eq!(
table
.remove_connection(a2)
.map(|c| c.connection_descriptor()),
Ok(a1)
.map(|c| c.connection_descriptor())
.unwrap(),
a1
);
assert_eq!(table.connection_count(), 0);
assert_err!(table.remove_connection(a2));
@@ -106,20 +107,23 @@ pub async fn test_add_get_remove() {
assert_eq!(
table
.remove_connection(a2)
.map(|c| c.connection_descriptor()),
Ok(a2)
.map(|c| c.connection_descriptor())
.unwrap(),
a2
);
assert_eq!(
table
.remove_connection(a3)
.map(|c| c.connection_descriptor()),
Ok(a3)
.map(|c| c.connection_descriptor())
.unwrap(),
a3
);
assert_eq!(
table
.remove_connection(a4)
.map(|c| c.connection_descriptor()),
Ok(a4)
.map(|c| c.connection_descriptor())
.unwrap(),
a4
);
assert_eq!(table.connection_count(), 0);
}