Adding NOOP test
This commit is contained in:
parent
2d2c0ba961
commit
de06ae7960
1 changed files with 10 additions and 0 deletions
|
|
@ -461,6 +461,16 @@ mod tests {
|
||||||
assert!(client.stream.written_buf == b"a1 CHECK\r\n".to_vec(), "Invalid check command");
|
assert!(client.stream.written_buf == b"a1 CHECK\r\n".to_vec(), "Invalid check command");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn noop() {
|
||||||
|
// TODO Make sure the response was read correctly
|
||||||
|
let response = b"a1 OK NOOP completed\r\n".to_vec();
|
||||||
|
let mock_stream = MockStream::new(response);
|
||||||
|
let mut client = create_client_with_mock_stream(mock_stream);
|
||||||
|
client.noop().unwrap();
|
||||||
|
assert!(client.stream.written_buf == b"a1 NOOP\r\n".to_vec(), "Invalid noop command");
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn close() {
|
fn close() {
|
||||||
// TODO Make sure the response was read correctly
|
// TODO Make sure the response was read correctly
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue