From de06ae79601a7368789949d3b38f6be202f86d62 Mon Sep 17 00:00:00 2001 From: Matt McCoy Date: Tue, 21 Jun 2016 20:13:24 -0400 Subject: [PATCH] Adding NOOP test --- src/client.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/client.rs b/src/client.rs index c0c0904..eb8e281 100644 --- a/src/client.rs +++ b/src/client.rs @@ -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