Adding NOOP test

This commit is contained in:
Matt McCoy 2016-06-21 20:13:24 -04:00
parent 2d2c0ba961
commit de06ae7960

View file

@ -461,6 +461,16 @@ mod tests {
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]
fn close() {
// TODO Make sure the response was read correctly