From 7074229b4ea28ac29424ce0dfacbdda708caf818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20Ha=CC=88hnel?= Date: Tue, 28 Nov 2023 07:32:41 +0100 Subject: [PATCH] test: fix parse_message test --- src/parser.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/parser.rs b/src/parser.rs index 3aa096b..7a57230 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -12,22 +12,15 @@ mod tests { use super::*; #[test] - fn test_parse_message_some() { + fn test_parse_message() { let message = paho_mqtt::Message::new( "device/123456789/report", r#"{ "hello": "world" }"#, paho_mqtt::QOS_2, ); - let result = parse_message(Some(message)).unwrap(); + let result = parse_message(message).unwrap(); assert_eq!(result, Message::Info(r#"{ "hello": "world" }"#.into())); } - - #[test] - fn test_parse_message_none() { - let result = parse_message(None).unwrap(); - - assert_eq!(result, Message::Unknown("Unknown message".into())); - } }