Skip to content

Commit 0717389

Browse files
committed
test(connection): increasing test coverage of connection module
1 parent 221f2c9 commit 0717389

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/header/common/connection.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,16 @@ impl Connection {
8888
bench_header!(close, Connection, { vec![b"close".to_vec()] });
8989
bench_header!(keep_alive, Connection, { vec![b"keep-alive".to_vec()] });
9090
bench_header!(header, Connection, { vec![b"authorization".to_vec()] });
91+
92+
#[cfg(test)]
93+
mod tests {
94+
use super::{Connection};
95+
use header::Header;
96+
97+
#[test]
98+
fn test_parse() {
99+
let val = vec![b"close".to_vec()];
100+
let parsed:Connection = Header::parse_header(&val[..]).unwrap();
101+
assert_eq!(parsed,Connection::close());
102+
}
103+
}

0 commit comments

Comments
 (0)